Skip to content

Commit

Permalink
chore: remove spin glctl
Browse files Browse the repository at this point in the history
  • Loading branch information
azrod committed Jan 13, 2024
1 parent e3c66c2 commit 1d75e40
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 21 deletions.
4 changes: 0 additions & 4 deletions cmd/glctl/cmd/get-link.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ var getLinkCmd = &cobra.Command{
err error
)

spin.Start()

if len(args) > 0 {
for _, arg := range args {
var (
Expand Down Expand Up @@ -83,7 +81,6 @@ var getLinkCmd = &cobra.Command{
}
fmt.Fprintf(w, fs, globalFlagNamespace, l.Name, l.SourcePath, l.TargetURL, l.Enabled.String())
}
spin.Stop()
w.Flush()

case globalFlagOutputWide:
Expand All @@ -94,7 +91,6 @@ var getLinkCmd = &cobra.Command{
for _, l := range links {
fmt.Fprintf(w, fs, globalFlagNamespace, l.Name, l.SourcePath, l.TargetURL, l.Enabled.String(), l.Labels)
}
spin.Stop()
w.Flush()
}
},
Expand Down
4 changes: 0 additions & 4 deletions cmd/glctl/cmd/get-namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ $> glctl get namespace [NAME] [NAME] [NAME]`,

return names, cobra.ShellCompDirectiveNoFileComp
},
PreRun: func(cmd *cobra.Command, args []string) {
spin.Start()
},
Run: func(cmd *cobra.Command, args []string) {
var (
sdk = initSDK()
Expand Down Expand Up @@ -81,7 +78,6 @@ $> glctl get namespace [NAME] [NAME] [NAME]`,
for _, l := range nss {
fmt.Fprintf(w, fs, l.Name, l.Enabled, fmt.Sprintf("%d", len(l.Links)))
}
spin.Stop()
w.Flush()
}
},
Expand Down
7 changes: 0 additions & 7 deletions cmd/glctl/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"time"

"github.com/janeczku/go-spinner"
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand All @@ -25,8 +24,6 @@ var date = "unknown"

var sdk *golink.Client

var spin *spinner.Spinner

var apiURL = "http://localhost:8081"

// rootCmd represents the base command when called without any subcommands.
Expand All @@ -39,10 +36,6 @@ var rootCmd = &cobra.Command{
// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
spin = spinner.NewSpinner("Loading...")
spin.SetCharset([]string{"◜", "◠", "◝", "◞", "◡", "◟"})
spin.SetSpeed(100 * time.Millisecond)

// Create a new context with timeout
ctx, cancel := context.WithTimeout(context.Background(), globalTimeout())
defer cancel()
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/iamolegga/enviper v1.4.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/janeczku/go-spinner v0.0.0-20150530144529-cf8ef1d64394 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -64,7 +63,6 @@ require (
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.13.0 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ github.com/iamolegga/enviper v1.4.0 h1:EmJiySDhv20KjCtkCADcsC3BUKwta+E983qcGF2Du
github.com/iamolegga/enviper v1.4.0/go.mod h1:zfAP/NiI+JhN+sy3r6edrNSyppFGTNQxaeYJ8kjQmsk=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/janeczku/go-spinner v0.0.0-20150530144529-cf8ef1d64394 h1:X8X7KPD2Gfk34zCn4C47e5UxUK72Oz8sBpe6aiN1gZE=
github.com/janeczku/go-spinner v0.0.0-20150530144529-cf8ef1d64394/go.mod h1:Z8lFST9wVOwMDDBpMpCCnpk93WKTb+UWT/4TTUxWZzA=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
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=
Expand Down Expand Up @@ -404,8 +402,6 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand Down

0 comments on commit 1d75e40

Please sign in to comment.