Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc. updates #60

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@ linters:
enable-all: true
disable:
# deprecated
- maligned
- scopelint
- interfacer
- golint
- exhaustivestruct
- nosnakecase
- structcheck
- deadcode
- varcheck
- ifshort
- gomnd
- execinquery
# unused
- nlreturn
- exhaustruct
- depguard
# requires go 1.22
- copyloopvar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the golangci-lint version in the codetests.yml file. You can update the action version too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't want this skipped because it'll be useful one day when we get to 1.22 golang version. The linter just ignores it now.

- intrange

output:
sort-results: true
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module golift.io/xtractr

go 1.19
Copy link
Contributor

@davidnewhall davidnewhall Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library still supports version 1.19 so I'm not sure I want to do this. We use 1.21 (latest-1) to do tests in GitHub actions.

go 1.21

require (
github.com/andybalholm/brotli v1.1.0
Expand All @@ -24,6 +24,6 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/text v0.16.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
18 changes: 9 additions & 9 deletions start.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package xtractr

import (
"fmt"
"errors"
"os"
)

Expand Down Expand Up @@ -50,14 +50,14 @@ type Xtractr struct {

// Custom errors returned by this module.
var (
ErrQueueStopped = fmt.Errorf("extractor queue stopped, cannot extract")
ErrNoCompressedFiles = fmt.Errorf("no compressed files found")
ErrUnknownArchiveType = fmt.Errorf("unknown archive file type")
ErrInvalidPath = fmt.Errorf("archived file contains invalid path")
ErrInvalidHead = fmt.Errorf("archived file contains invalid header file")
ErrQueueRunning = fmt.Errorf("extractor queue running, cannot start")
ErrNoConfig = fmt.Errorf("call NewQueue() to initialize a queue")
ErrNoLogger = fmt.Errorf("xtractr.Config.Logger must be non-nil")
ErrQueueStopped = errors.New("extractor queue stopped, cannot extract")
ErrNoCompressedFiles = errors.New("no compressed files found")
ErrUnknownArchiveType = errors.New("unknown archive file type")
ErrInvalidPath = errors.New("archived file contains invalid path")
ErrInvalidHead = errors.New("archived file contains invalid header file")
ErrQueueRunning = errors.New("extractor queue running, cannot start")
ErrNoConfig = errors.New("call NewQueue() to initialize a queue")
ErrNoLogger = errors.New("xtractr.Config.Logger must be non-nil")
)

// NewQueue returns a new Xtractr Queue you can send Xtract jobs into.
Expand Down
Loading