Skip to content

Commit

Permalink
update xanzy/go-gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
marriva committed Dec 28, 2023
1 parent ef3dabc commit 69cb582
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/projects/branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"strings"
"text/tabwriter"

"dario.cat/mergo"
"github.com/flant/glaball/cmd/common"
"github.com/flant/glaball/pkg/client"
"github.com/flant/glaball/pkg/limiter"
"github.com/flant/glaball/pkg/sort/v2"
"github.com/flant/glaball/pkg/util"
"github.com/hashicorp/go-hclog"
"github.com/imdario/mergo"
"github.com/spf13/cobra"
"github.com/xanzy/go-gitlab"
)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ module github.com/flant/glaball
go 1.19

require (
dario.cat/mergo v1.0.0
github.com/ahmetb/go-linq v3.0.0+incompatible
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/go-retryablehttp v0.7.4
github.com/imdario/mergo v0.3.16
github.com/jmoiron/sqlx v1.3.5
github.com/peterbourgon/diskv v2.0.1+incompatible
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.16.0
github.com/xanzy/go-gitlab v0.90.0
github.com/xanzy/go-gitlab v0.95.2
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
Expand Down Expand Up @@ -150,8 +152,6 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g=
Expand Down Expand Up @@ -221,6 +221,8 @@ github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/xanzy/go-gitlab v0.90.0 h1:j8ZUHfLfXdnC+B8njeNaW/kM44c1zw8fiuNj7D+qQN8=
github.com/xanzy/go-gitlab v0.90.0/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw=
github.com/xanzy/go-gitlab v0.95.2 h1:4p0IirHqEp5f0baK/aQqr4TR57IsD+8e4fuyAA1yi88=
github.com/xanzy/go-gitlab v0.95.2/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
12 changes: 6 additions & 6 deletions pkg/sort/v2/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ func (c Cached) String() string {
type Elements []interface{}

func (e Elements) Hosts() client.Hosts {
s := make(client.Hosts, 0, len(e))
for _, v := range e {
s = append(s, v.(Element).Host)
s := make(client.Hosts, len(e))
for i, v := range e {
s[i] = v.(Element).Host
}
return s
}
Expand All @@ -73,9 +73,9 @@ func (e Elements) Cached() (cached Cached) {
}

func (e Elements) Typed() []Element {
s := make([]Element, 0, len(e))
for _, v := range e {
s = append(s, v.(Element))
s := make([]Element, len(e))
for i, v := range e {
s[i] = v.(Element)
}
return s
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/util/pointers.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ func (f *visibilityPtrValue) Type() string {
return "string"
}

type labelsPtrValue struct{ v **gitlab.Labels }
type labelsPtrValue struct{ v **gitlab.LabelOptions }

func NewLabelsPtrValue(p **gitlab.Labels) *labelsPtrValue {
func NewLabelsPtrValue(p **gitlab.LabelOptions) *labelsPtrValue {
return &labelsPtrValue{p}
}

func (f *labelsPtrValue) Set(s string) error {
if *f.v == nil {
*f.v = new(gitlab.Labels)
*f.v = new(gitlab.LabelOptions)
}
**f.v = append(**f.v, s)

Expand Down

0 comments on commit 69cb582

Please sign in to comment.