Skip to content

Commit dd03402

Browse files
authored
Merge pull request #135 from vmware-labs/update-go-1.26
Update to Go 1.26.0 and prepare release
2 parents 2fe66ef + 5d4d062 commit dd03402

File tree

32 files changed

+112
-111
lines changed

32 files changed

+112
-111
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
- name: Set Golang
3030
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
3131
with:
32-
go-version: '^1.25'
32+
go-version: '^1.26'
3333

3434
- name: Set Golangci-lint
35-
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.4.0
35+
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.9.0
3636

3737
- name: Set Shellcheck
3838
run: sudo apt-get -qq update && sudo apt-get install -y shellcheck && shellcheck install-binary.sh

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set Golang
3636
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
3737
with:
38-
go-version: '^1.25'
38+
go-version: '^1.26'
3939

4040
- name: Build
4141
run: make build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/examples/
44
/.vscode/
55
/.idea
6+
/.DS_Store
67
**~
78
**.tgz
89
/out/

cmd/dt/carvelize/carvelize.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
"github.com/vmware-labs/distribution-tooling-for-helm/cmd/dt/verify"
1414
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/carvel"
1515
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/chartutils"
16+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog"
17+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog/silent"
1618
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/imagelock"
17-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log"
18-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log/silent"
1919

2020
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/utils"
2121
)
@@ -67,7 +67,7 @@ func NewCmd(cfg *config.Config) *cobra.Command {
6767
}
6868
l.Infof("Images.lock file written to %q", lockFile)
6969
}
70-
if err := l.Section(fmt.Sprintf("Generating Carvel bundle for Helm chart %q", chartPath), func(childLog log.SectionLogger) error {
70+
if err := l.Section(fmt.Sprintf("Generating Carvel bundle for Helm chart %q", chartPath), func(childLog dtlog.SectionLogger) error {
7171
if err := GenerateBundle(
7272
chartPath,
7373
chartutils.WithAnnotationsKey(cfg.AnnotationsKey),

cmd/dt/config/config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ import (
99
"sync"
1010
"syscall"
1111

12+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog"
13+
ll "github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog/logrus"
1214
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/imagelock"
13-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log"
14-
ll "github.com/vmware-labs/distribution-tooling-for-helm/pkg/log/logrus"
1515

16-
pl "github.com/vmware-labs/distribution-tooling-for-helm/pkg/log/pterm"
16+
pl "github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog/pterm"
1717
)
1818

1919
// Config defines the configuration of the dt tool
2020
type Config struct {
2121
Insecure bool
22-
logger log.SectionLogger
22+
logger dtlog.SectionLogger
2323
Context context.Context
2424
AnnotationsKey string
2525
TempDirectory string
@@ -40,16 +40,16 @@ func NewConfig() *Config {
4040
}
4141

4242
// Logger returns the current SectionLogger, creating it if necessary
43-
func (c *Config) Logger() log.SectionLogger {
43+
func (c *Config) Logger() dtlog.SectionLogger {
4444
if c.logger == nil {
4545

46-
var l log.SectionLogger
46+
var l dtlog.SectionLogger
4747
if c.UsePlainLog {
4848
l = ll.NewSectionLogger()
4949
} else {
5050
l = pl.NewSectionLogger()
5151
}
52-
lvl, err := log.ParseLevel(c.LogLevel)
52+
lvl, err := dtlog.ParseLevel(c.LogLevel)
5353

5454
if err != nil {
5555
l.Warnf("Invalid log level %s: %v", c.LogLevel, err)

cmd/dt/info/info.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/spf13/cobra"
1010
"github.com/vmware-labs/distribution-tooling-for-helm/cmd/dt/config"
1111
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/chartutils"
12-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log"
12+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog"
1313
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/utils"
1414
)
1515

@@ -44,21 +44,21 @@ func NewCmd(cfg *config.Config) *cobra.Command {
4444
}
4545
} else {
4646

47-
_ = l.Section("Wrap Information", func(l log.SectionLogger) error {
47+
_ = l.Section("Wrap Information", func(l dtlog.SectionLogger) error {
4848
l.Printf("Chart: %s", lock.Chart.Name)
4949
l.Printf("Version: %s", lock.Chart.Version)
5050
l.Printf("App Version: %s", lock.Chart.AppVersion)
51-
_ = l.Section("Metadata", func(l log.SectionLogger) error {
51+
_ = l.Section("Metadata", func(l dtlog.SectionLogger) error {
5252
for k, v := range lock.Metadata {
5353
l.Printf("- %s: %s", k, v)
5454

5555
}
5656
return nil
5757
})
58-
_ = l.Section("Images", func(l log.SectionLogger) error {
58+
_ = l.Section("Images", func(l dtlog.SectionLogger) error {
5959
for _, img := range lock.Images {
6060
if showDetails {
61-
_ = l.Section(fmt.Sprintf("%s/%s", img.Chart, img.Name), func(l log.SectionLogger) error {
61+
_ = l.Section(fmt.Sprintf("%s/%s", img.Chart, img.Name), func(l dtlog.SectionLogger) error {
6262
l.Printf("Image: %s", img.Image)
6363
if showDetails {
6464
l.Printf("Digests")

cmd/dt/lock/lock.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"github.com/spf13/cobra"
1010
"github.com/vmware-labs/distribution-tooling-for-helm/cmd/dt/config"
1111
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/chartutils"
12+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog"
13+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog/silent"
1214
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/imagelock"
13-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log"
14-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log/silent"
1515
)
1616

1717
// NewCmd returns a new dt lock command
@@ -64,7 +64,7 @@ func NewCmd(cfg *config.Config) *cobra.Command {
6464
}
6565

6666
// Create generates an Images.lock file from the chart annotations
67-
func Create(chartPath string, outputFile string, l log.Logger, opts ...imagelock.Option) error {
67+
func Create(chartPath string, outputFile string, l dtlog.Logger, opts ...imagelock.Option) error {
6868
l.Infof("Generating images lock for Helm chart %q", chartPath)
6969

7070
lock, err := imagelock.GenerateFromChart(chartPath, opts...)

cmd/dt/login/login.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/google/go-containerregistry/pkg/name"
1313
"github.com/spf13/cobra"
1414
"github.com/vmware-labs/distribution-tooling-for-helm/cmd/dt/config"
15-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log"
15+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog"
1616
)
1717

1818
type loginOptions struct {
@@ -61,7 +61,7 @@ func NewCmd(cfg *config.Config) *cobra.Command {
6161
}
6262

6363
// from https://github.com/google/go-containerregistry/blob/main/cmd/crane/cmd/auth.go
64-
func login(opts loginOptions, l log.SectionLogger) error {
64+
func login(opts loginOptions, l dtlog.SectionLogger) error {
6565
if opts.passwordStdin {
6666
contents, err := io.ReadAll(os.Stdin)
6767
if err != nil {

cmd/dt/logout/logout.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/google/go-containerregistry/pkg/name"
1010
"github.com/spf13/cobra"
1111
"github.com/vmware-labs/distribution-tooling-for-helm/cmd/dt/config"
12-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log"
12+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog"
1313
)
1414

1515
// NewCmd returns a new dt logout command
@@ -40,7 +40,7 @@ func NewCmd(cfg *config.Config) *cobra.Command {
4040
}
4141

4242
// from https://github.com/google/go-containerregistry/blob/main/cmd/crane/cmd/auth.go
43-
func logout(serverAddress string, l log.SectionLogger) error {
43+
func logout(serverAddress string, l dtlog.SectionLogger) error {
4444
l.Infof("logout from %s", serverAddress)
4545
cf, err := dockercfg.Load(os.Getenv("DOCKER_CONFIG"))
4646
if err != nil {

cmd/dt/pull/pull.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/vmware-labs/distribution-tooling-for-helm/cmd/dt/config"
99
"github.com/vmware-labs/distribution-tooling-for-helm/internal/widgets"
1010
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/chartutils"
11-
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/log"
11+
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/dtlog"
1212
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/utils"
1313
"github.com/vmware-labs/distribution-tooling-for-helm/pkg/wrapping"
1414
)
@@ -55,7 +55,7 @@ func NewCmd(cfg *config.Config) *cobra.Command {
5555
if len(lock.Images) == 0 {
5656
l.Warnf("No images found in Images.lock")
5757
} else {
58-
if err := l.Section(fmt.Sprintf("Pulling images into %q", chart.ImagesDir()), func(childLog log.SectionLogger) error {
58+
if err := l.Section(fmt.Sprintf("Pulling images into %q", chart.ImagesDir()), func(childLog dtlog.SectionLogger) error {
5959
if err := pullImages(
6060
chart,
6161
imagesDir,

0 commit comments

Comments
 (0)