From a1b9d98329666aac318c93d40f5aa2a8d668626a Mon Sep 17 00:00:00 2001 From: Osamu TONOMORI Date: Wed, 4 May 2022 14:36:58 +0900 Subject: [PATCH] Fix linter warnings --- .golangci.yml | 1 + indigo.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d97d2ad..73d2063 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -18,3 +18,4 @@ issues: linters: - funlen - forbidigo + - varnamelen diff --git a/indigo.go b/indigo.go index c316cc6..f7c56ad 100644 --- a/indigo.go +++ b/indigo.go @@ -32,14 +32,14 @@ func New(enc Encoder, options ...func(*sonyflake.Settings)) *Generator { enc = base58.MustNewEncoder(base58.StandardSource) } - s := sonyflake.Settings{} + var settings sonyflake.Settings for i := range options { - options[i](&s) + options[i](&settings) } return &Generator{ - sf: sonyflake.NewSonyflake(s), + sf: sonyflake.NewSonyflake(settings), enc: enc, } }