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

update go, reformat code, add basic build, test, lint CI jobs #3

Merged
merged 5 commits into from
Oct 22, 2024
Merged

Conversation

fho
Copy link

@fho fho commented Oct 22, 2024

fix golangci-lint warnings

Fix the following issues:

  etcd/etcd.go:39:50: S1002: should omit comparison to bool constant, can be simplified to `match` (gosimple)
        if match, _ := regexp.Match("0\\.4\\.*", body); match == true {
  etcd/etcd.go:4:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
        "io/ioutil"
  zookeeper/zookeeper.go:30:11: Error return value of `c.Create` is not checked (errcheck)
                c.Create(uri.Path, []byte{}, 0, zk.WorldACL(zk.PermAll))
  bridge/bridge.go:229:6: S1002: should omit comparison to bool constant, can be simplified to `!b.config.Internal` (gosimple)
                if b.config.Internal != true && port.HostPort == "" {
  bridge/bridge.go:301:5: S1002: should omit comparison to bool constant, can be simplified to `b.config.Internal` (gosimple)
        if b.config.Internal == true {
  bridge/bridge.go:213:41: composites: github.com/fsouza/go-dockerclient.PortBinding struct literal uses unkeyed fields (govet)
                published := []dockerapi.PortBinding{ {"0.0.0.0", port.Port()}, }

-------------------------------------------------------------------------------
remove unused functions

-------------------------------------------------------------------------------
reformat code with gofumpt

-------------------------------------------------------------------------------
ci: build, lint and test applicaton in github actions

-------------------------------------------------------------------------------
go: increase minimum version to 1.23.2

-------------------------------------------------------------------------------

fho added 5 commits October 22, 2024 15:30
Fix the following issues:

  etcd/etcd.go:39:50: S1002: should omit comparison to bool constant, can be simplified to `match` (gosimple)
  	if match, _ := regexp.Match("0\\.4\\.*", body); match == true {
  etcd/etcd.go:4:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
  	"io/ioutil"
  zookeeper/zookeeper.go:30:11: Error return value of `c.Create` is not checked (errcheck)
  		c.Create(uri.Path, []byte{}, 0, zk.WorldACL(zk.PermAll))
  bridge/bridge.go:229:6: S1002: should omit comparison to bool constant, can be simplified to `!b.config.Internal` (gosimple)
  		if b.config.Internal != true && port.HostPort == "" {
  bridge/bridge.go:301:5: S1002: should omit comparison to bool constant, can be simplified to `b.config.Internal` (gosimple)
  	if b.config.Internal == true {
  bridge/bridge.go:213:41: composites: github.com/fsouza/go-dockerclient.PortBinding struct literal uses unkeyed fields (govet)
  		published := []dockerapi.PortBinding{ {"0.0.0.0", port.Port()}, }
@fho fho self-assigned this Oct 22, 2024
@fho fho merged commit d502d0c into master Oct 22, 2024
3 checks passed
@fho fho deleted the ci branch October 22, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant