diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index c8a8ea7..4f64e86 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -11,8 +11,5 @@ jobs: with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. version: v1.30 - - # Optional: golangci-lint command line arguments. - args: --max-issues-per-linter=0 --exclude-use-default --disable-all -E deadcode -E errcheck -E gosimple -E govet -E ineffassign -E staticcheck -E structcheck -E typecheck -E unused -E varcheck -E dupl -E exhaustive -E exportloopref -E goconst -E gocritic -E goerr113 -E gofmt -E goimports -E golint -E goprintffuncname -E interfacer -E lll -E maligned -E misspell -E nakedret -E nolintlint -E prealloc -E scopelint -E unconvert -E unparam # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..e010a47 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,38 @@ +linters: + fast: false + disable-all: true + enable: + - deadcode + - errcheck + - gosimple + - govet + - ineffassign + - staticcheck + - structcheck + - typecheck + - unused + - varcheck + - dupl + - exhaustive + - exportloopref + - goconst + - gocritic + - goerr113 + - gofmt + - goimports + - golint + - goprintffuncname + - interfacer + - lll + - maligned + - misspell + - nakedret + - nolintlint + - prealloc + - scopelint + - unconvert + - unparam + +issues: + exclude-use-default: true + max-issues-per-linter: 0 diff --git a/CHANGELOG.md b/CHANGELOG.md index d72347e..bc0dc85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The `shift_numbers` key in the config was added, so that non US keyboard users can navigate tabs (#64) - F1 and F2 keys for navigating to the previous and next tabs (#64) - Resolving any relative path (starting with a `.`) in the bottom bar is supported, not just `..` (#71) +- Set programs in config to open other schemes like `gopher://` or `magnet:` (#74) ### Changed - Update to [go-gemini](https://github.com/makeworld-the-better-one/go-gemini) v0.8.4 diff --git a/display/private.go b/display/private.go index c56b270..828390e 100644 --- a/display/private.go +++ b/display/private.go @@ -174,13 +174,13 @@ func handleOther(u string) { } switch handler { case "", "off": - Error("URL Error", "Opening " + parsed.Scheme + " URLs is turned off.") + Error("URL Error", "Opening "+parsed.Scheme+" URLs is turned off.") default: // The config has a custom command to execute for URLs fields := strings.Fields(handler) err := exec.Command(fields[0], append(fields[1:], u)...).Start() if err != nil { - Error("URL Error", "Error executing custom command: " + err.Error()) + Error("URL Error", "Error executing custom command: "+err.Error()) } } App.Draw()