Skip to content

Commit

Permalink
update golangci lint info
Browse files Browse the repository at this point in the history
  • Loading branch information
casualjim committed Mar 16, 2023
1 parent d40cbfc commit a1049a1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 28 deletions.
59 changes: 34 additions & 25 deletions .golangci.yml
Expand Up @@ -14,31 +14,40 @@ linters-settings:
min-occurrences: 4

linters:
enable-all: true
disable:
- maligned
- lll
- gochecknoinits
- gochecknoglobals
- godox
- gocognit
- whitespace
- wsl
- funlen
- wrapcheck
- testpackage
- nlreturn
- gofumpt
- goerr113
- gci
- gomnd
- godot
- exhaustivestruct
- paralleltest
- varnamelen
- ireturn
- exhaustruct
#- thelper
enable:
- revive
- goimports
- gosec
- unparam
- unconvert
- predeclared
- prealloc
- misspell

# disable:
# - maligned
# - lll
# - gochecknoinits
# - gochecknoglobals
# - godox
# - gocognit
# - whitespace
# - wsl
# - funlen
# - wrapcheck
# - testpackage
# - nlreturn
# - gofumpt
# - goerr113
# - gci
# - gomnd
# - godot
# - exhaustivestruct
# - paralleltest
# - varnamelen
# - ireturn
# - exhaustruct
# #- thelper

issues:
exclude-rules:
Expand Down
11 changes: 8 additions & 3 deletions ulid.go
Expand Up @@ -15,9 +15,12 @@ import (

// ULID represents a ulid string format
// ref:
// https://github.com/ulid/spec
//
// https://github.com/ulid/spec
//
// impl:
// https://github.com/oklog/ulid
//
// https://github.com/oklog/ulid
//
// swagger:strfmt ulid
type ULID struct {
Expand Down Expand Up @@ -89,7 +92,9 @@ func NewULIDZero() ULID {
}

// NewULID generates new unique ULID value and a error if any
func NewULID() (u ULID, err error) {
func NewULID() (ULID, error) {
var u ULID

obj := ulidEntropyPool.Get()
entropy, ok := obj.(io.Reader)
if !ok {
Expand Down

0 comments on commit a1049a1

Please sign in to comment.