mirror of
https://github.com/sony/sonyflake.git
synced 2026-12-03 18:49:29 +00:00
Introduce New function (#47)
* feat(Sonyflake): define error variables * feat(Sonyflake): add New() function - minor logic improvements - return errors * tests(Sonyflake): remove old TestNilSonyflake test function in favour of the New() function coverage * gofmt * Update error messages and comments * Introduce New function --------- Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com>
This commit is contained in:
1 parent
18c4908321
commit
06f9b47996
3 files changed
+89
-36
No files matched your search
@@ -33,10 +33,10 @@ go get github.com/sony/sonyflake
|
||||
Usage
|
||||
-----
|
||||
|
||||
The function NewSonyflake creates a new Sonyflake instance.
|
||||
The function New creates a new Sonyflake instance.
|
||||
|
||||
```go
|
||||
func NewSonyflake(st Settings) *Sonyflake
|
||||
func New(st Settings) (*Sonyflake, error)
|
||||
```
|
||||
|
||||
You can configure Sonyflake by the struct Settings:
|
||||
|
||||
Reference in new issue
Block a user