Skip to content

Commit bee45cd

Browse files
Merge pull request #39 from FrankYang0529/HARV-6160
feat: upgrade go version to 1.22
2 parents 0e6e08c + 3ce89d7 commit bee45cd

File tree

21 files changed

+33
-44
lines changed

21 files changed

+33
-44
lines changed

Dockerfile.dapper

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM registry.suse.com/bci/golang:1.20
1+
FROM registry.suse.com/bci/golang:1.22
22

33
RUN zypper in -y bash git gcc docker vim less file curl wget ca-certificates trousers-devel
44

5-
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.51.1
5+
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.58.2
66

77
ENV DAPPER_ENV REPO TAG DRONE_TAG
88
ENV DAPPER_SOURCE /go/src/github.com/rancher/rancherd/

cmd/rancherd/bootstrap/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type Bootstrap struct {
1818
//Config string `usage:"Custom config path" default:"/etc/rancher/rancherd/config.yaml" short:"c"`
1919
}
2020

21-
func (b *Bootstrap) Run(cmd *cobra.Command, args []string) error {
21+
func (b *Bootstrap) Run(cmd *cobra.Command, _ []string) error {
2222
r := rancherd.New(rancherd.Config{
2323
Force: b.Force,
2424
DataDir: rancherd.DefaultDataDir,

cmd/rancherd/gettoken/gettoken.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type GetToken struct {
1818
Kubeconfig string `usage:"Kubeconfig file" env:"KUBECONFIG"`
1919
}
2020

21-
func (p *GetToken) Run(cmd *cobra.Command, args []string) error {
21+
func (p *GetToken) Run(cmd *cobra.Command, _ []string) error {
2222
str, err := token.GetToken(cmd.Context(), p.Kubeconfig)
2323
if err != nil {
2424
return err

cmd/rancherd/gettpmhash/gettpmhash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func NewGetTPMHash() *cobra.Command {
1818
type GetTPMHash struct {
1919
}
2020

21-
func (p *GetTPMHash) Run(cmd *cobra.Command, args []string) error {
21+
func (p *GetTPMHash) Run(*cobra.Command, []string) error {
2222
str, err := tpm.GetPubHash()
2323
if err != nil {
2424
return err

cmd/rancherd/info/info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func NewInfo() *cobra.Command {
1515
type Info struct {
1616
}
1717

18-
func (b *Info) Run(cmd *cobra.Command, args []string) error {
18+
func (b *Info) Run(cmd *cobra.Command, _ []string) error {
1919
r := rancherd.New(rancherd.Config{
2020
DataDir: rancherd.DefaultDataDir,
2121
ConfigPath: rancherd.DefaultConfigFile,

cmd/rancherd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
type Rancherd struct {
1919
}
2020

21-
func (a *Rancherd) Run(cmd *cobra.Command, args []string) error {
21+
func (a *Rancherd) Run(cmd *cobra.Command, _ []string) error {
2222
return cmd.Help()
2323
}
2424

cmd/rancherd/probe/probe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type Probe struct {
2121
File string `usage:"Plan file" default:"/var/lib/rancher/rancherd/plan/plan.json" short:"f"`
2222
}
2323

24-
func (p *Probe) Run(cmd *cobra.Command, args []string) error {
24+
func (p *Probe) Run(cmd *cobra.Command, _ []string) error {
2525
interval, err := time.ParseDuration(p.Interval)
2626
if err != nil {
2727
return fmt.Errorf("parsing duration %s: %w", p.Interval, err)

cmd/rancherd/resetadmin/resetadmin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type ResetAdmin struct {
1818
Kubeconfig string `usage:"Kubeconfig file" env:"KUBECONFIG"`
1919
}
2020

21-
func (p *ResetAdmin) Run(cmd *cobra.Command, args []string) error {
21+
func (p *ResetAdmin) Run(cmd *cobra.Command, _ []string) error {
2222
return auth.ResetAdmin(cmd.Context(), &auth.Options{
2323
Password: p.Password,
2424
PasswordFile: p.PasswordFile,

cmd/rancherd/updateclientsecret/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ type UpdateClientSecret struct {
1717
Kubeconfig string `usage:"Kubeconfig file" env:"KUBECONFIG"`
1818
}
1919

20-
func (s *UpdateClientSecret) Run(cmd *cobra.Command, args []string) error {
20+
func (s *UpdateClientSecret) Run(cmd *cobra.Command, _ []string) error {
2121
return rancher.UpdateClientSecret(cmd.Context(), &rancher.Options{Kubeconfig: s.Kubeconfig})
2222
}

cmd/rancherd/upgrade/upgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type Upgrade struct {
1919
Force bool `usage:"Run without prompting for confirmation" short:"f"`
2020
}
2121

22-
func (b *Upgrade) Run(cmd *cobra.Command, args []string) error {
22+
func (b *Upgrade) Run(cmd *cobra.Command, _ []string) error {
2323
r := rancherd.New(rancherd.Config{
2424
Force: b.Force,
2525
DataDir: rancherd.DefaultDataDir,

0 commit comments

Comments
 (0)