Skip to content

Commit

Permalink
👻 Go 1.20.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Jan 24, 2024
1 parent e3e1236 commit db5978d
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 36 deletions.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
GOBIN ?= ${GOPATH}/bin
IMG ?= quay.io/konveyor/tackle2-addon-analyzer:latest
CMD ?= bin/addon
AddonDir ?= /tmp/addon
GOPATH ?= $(HOME)/go
GOBIN ?= $(GOPATH)/bin
IMG ?= quay.io/konveyor/tackle2-addon-analyzer:latest
CMD ?= bin/addon
AddonDir ?= /tmp/addon
GOIMPORTS = $(GOBIN)/goimports

cmd: fmt vet
go build -ldflags="-w -s" -o ${CMD} github.com/konveyor/tackle2-addon-analyzer/cmd
Expand All @@ -17,9 +19,12 @@ run: cmd
$(eval cmd := $(abspath ${CMD}))
cd ${AddonDir};${cmd}

fmt:
go fmt ./...
fmt: $(GOIMPORTS)
$(GOIMPORTS) -w ./cmd

vet:
go vet ./...
go vet ./cmd/...

# Ensure goimports installed.
$(GOIMPORTS):
go install golang.org/x/tools/cmd/goimports@latest
3 changes: 2 additions & 1 deletion cmd/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"path"

"github.com/konveyor/tackle2-addon-analyzer/builder"
"github.com/konveyor/tackle2-addon/command"
"path"
)

type RuleError = builder.RuleError
Expand Down
3 changes: 2 additions & 1 deletion cmd/cmd_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"github.com/onsi/gomega"
"testing"

"github.com/onsi/gomega"
)

func TestRuleSelector(t *testing.T) {
Expand Down
11 changes: 4 additions & 7 deletions cmd/mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@ type Mode struct {
// Build assets.
func (r *Mode) Build(application *api.Application) (err error) {
binDir := path.Join(BinDir, "maven")
maven := &repository.Maven{
M2Dir: M2Dir,
BinDir: binDir,
Remote: repository.Remote{
Identities: application.Identities,
},
}
maven := &repository.Maven{}
maven.M2Dir = M2Dir
maven.BinDir = binDir
maven.Identities = application.Identities
path, err := maven.CreateSettingsFile()
if err != nil {
return err
Expand Down
11 changes: 6 additions & 5 deletions cmd/rules.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package main

import (
"os"
"path"
"regexp"
"strconv"
"strings"

"github.com/konveyor/analyzer-lsp/parser"
"github.com/konveyor/tackle2-addon/command"
"github.com/konveyor/tackle2-addon/repository"
"github.com/konveyor/tackle2-hub/api"
"github.com/konveyor/tackle2-hub/nas"
"github.com/rogpeppe/go-internal/semver"
"os"
"path"
"regexp"
"strconv"
"strings"
)

type History = map[uint]byte
Expand Down
4 changes: 2 additions & 2 deletions cmd/scope.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"github.com/konveyor/tackle2-addon/command"
"strings"

"github.com/konveyor/tackle2-addon/command"
)

// Scope settings.
Expand All @@ -28,7 +29,6 @@ func (r *Scope) AddOptions(options *command.Options) (err error) {
return
}

//
// incidentSelector returns an incident selector.
// The injected `!package` matches incidents without a package variable.
func (r *Scope) incidentSelector() (selector string) {
Expand Down
9 changes: 5 additions & 4 deletions cmd/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package main

import (
"errors"
"github.com/konveyor/analyzer-lsp/provider"
hub "github.com/konveyor/tackle2-hub/addon"
"github.com/konveyor/tackle2-hub/api"
"gopkg.in/yaml.v2"
"io"
"os"
"path"
"strconv"
"strings"

"github.com/konveyor/analyzer-lsp/provider"
hub "github.com/konveyor/tackle2-hub/addon"
"github.com/konveyor/tackle2-hub/api"
"gopkg.in/yaml.v2"
)

// Settings - provider settings file.
Expand Down
5 changes: 3 additions & 2 deletions cmd/tagger.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"github.com/konveyor/tackle2-addon/command"
"github.com/konveyor/tackle2-hub/api"
"math/rand"
"regexp"

"github.com/konveyor/tackle2-addon/command"
"github.com/konveyor/tackle2-hub/api"
)

var TagExp = regexp.MustCompile("(.+)(=)(.+)")
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ require (
github.com/gin-gonic/gin v1.9.0
github.com/konveyor/analyzer-lsp v0.0.0-20230712145100-60dc2048444c
github.com/konveyor/tackle2-addon v0.3.0-rc.3.0.20240110200734-c6a793e8ee2c
github.com/konveyor/tackle2-hub v0.3.0-rc.2.0.20231219211826-f09d0b24c0e6
github.com/konveyor/tackle2-hub v0.3.1-0.20240123170057-e18a6547d4af
github.com/onsi/gomega v1.27.6
github.com/rogpeppe/go-internal v1.10.0
go.lsp.dev/uri v0.3.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
)

replace github.com/konveyor/tackle2-addon => github.com/jortel/tackle2-addon v0.0.0-20240123193240-3a4186fba213

require (
github.com/Nerzal/gocloak/v10 v10.0.1 // indirect
github.com/PaesslerAG/gval v1.2.2 // indirect
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jortel/go-utils v0.1.2 h1:R0TcGRCcwoL793CymcKC5AF9idWXT2cR6eQ2xpBUsoI=
github.com/jortel/go-utils v0.1.2/go.mod h1:sl6vav63ODI0sUfSz8e0pImNmCVFnVsuOFhZmwe9GDk=
github.com/jortel/tackle2-addon v0.0.0-20240123193240-3a4186fba213 h1:qcrgQ41X8mPZtztU62i5R6V6HrbL3Ra92FxIhzS5z3c=
github.com/jortel/tackle2-addon v0.0.0-20240123193240-3a4186fba213/go.mod h1:KAdekTXmr4TswWJyHRWaXGH+FeShMFaWTQi+JreWPSY=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
Expand All @@ -145,12 +147,8 @@ github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBF
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/konveyor/analyzer-lsp v0.0.0-20230712145100-60dc2048444c h1:DbOZO3cNmLBJ5Z6iXyl7Fb3ejWxicHAa3OHI++0KJd4=
github.com/konveyor/analyzer-lsp v0.0.0-20230712145100-60dc2048444c/go.mod h1:+k6UreVv8ztI29/RyQN8/71AAmB0aWwQoWwZd3yR8sc=
github.com/konveyor/tackle2-addon v0.3.0-rc.3.0.20240108180210-3de14a352bb8 h1:fc/YHGRf/q28lK5Z4W3l3NuLLWkOKe/S+nsH6R4IMgU=
github.com/konveyor/tackle2-addon v0.3.0-rc.3.0.20240108180210-3de14a352bb8/go.mod h1:2ULCt88EGBK/N8bOCaerrUNlRw/VCZVXfXRBwmngNj4=
github.com/konveyor/tackle2-addon v0.3.0-rc.3.0.20240110200734-c6a793e8ee2c h1:WKYq21yB2qQd314FBl26pXaUHOlYK69KXNuOD9hp3gE=
github.com/konveyor/tackle2-addon v0.3.0-rc.3.0.20240110200734-c6a793e8ee2c/go.mod h1:2ULCt88EGBK/N8bOCaerrUNlRw/VCZVXfXRBwmngNj4=
github.com/konveyor/tackle2-hub v0.3.0-rc.2.0.20231219211826-f09d0b24c0e6 h1:xPLwmNqA3QxVaqqnhF6v/T2ZMTCom2GcROD2BEJIHnQ=
github.com/konveyor/tackle2-hub v0.3.0-rc.2.0.20231219211826-f09d0b24c0e6/go.mod h1:ZR4A0+Wp0H3QZkMohPnvZjxcolVORP3jdHV9Uwb/PoE=
github.com/konveyor/tackle2-hub v0.3.1-0.20240123170057-e18a6547d4af h1:5sBsSoEi4TwFOzRaA87DGtXZOJHMEUH8WmBk+AfvJXY=
github.com/konveyor/tackle2-hub v0.3.1-0.20240123170057-e18a6547d4af/go.mod h1:97Z3kWWmPERNl58XkpQkV/F+jnqNNDAVpL9m9XTZmdo=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
Expand Down

0 comments on commit db5978d

Please sign in to comment.