diff --git a/.golangci.yml b/.golangci.yml index 14bfaae..c54d423 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -248,7 +248,8 @@ linters-settings: # Setting locale to US will correct the British spelling of 'colour' to 'color'. locale: US ignore-words: - - someword + - bsv + - bitcoin nakedret: # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 max-func-lines: 30 @@ -303,7 +304,7 @@ linters-settings: # Allow multiline assignments to be cuddled. Default is true. allow-multiline-assign: true # Allow declarations (var) to be cuddled. - allow-cuddle-declarations: false + allow-cuddle-declarations: true # Allow trailing comments in ending of blocks allow-trailing-comment: false # Force newlines in end of case at this limit (0 = never). @@ -333,9 +334,31 @@ linters: enable: - megacheck - govet - disable: + - gosec + - bodyclose + - golint + - unconvert + - dupl - maligned + - misspell + - dogsled - prealloc + - exportloopref + - exhaustive + - sqlclosecheck + - nolintlint + - gci + - goconst + disable: + - gocritic # use this for very opinionated linting + - gochecknoglobals + - whitespace + - wsl + - goerr113 + - godot + - testpackage + - nestif + - nlreturn disable-all: false presets: - bugs diff --git a/address.go b/address.go index 4c5cc1e..dda2a46 100644 --- a/address.go +++ b/address.go @@ -2,12 +2,11 @@ package bitcoin import ( "bytes" + "crypto/sha256" "encoding/hex" "errors" "fmt" - "crypto/sha256" - "github.com/bitcoinsv/bsvd/bsvec" "github.com/bitcoinsv/bsvd/chaincfg" "github.com/bitcoinsv/bsvd/txscript"