Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGong2013 committed Mar 9, 2023
1 parent 9eb8f07 commit bce9bd4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
2 changes: 2 additions & 0 deletions cmd/check_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func runCheck(cmd *cobra.Command, args []string) {
refreshCookie = false
}

fmt.Println("initial publishers ...")

curls, browsers, plugins, err := InitPublishers(sc, !refreshCookie)

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/storage/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (s *Storage) upToDateIfLocalClean() error {
fmt.Println("Already up to date.")
return nil
} else {
fmt.Fprintf(os.Stderr, "error: %s\n", err)
fmt.Fprintf(os.Stderr, "worktree pull error: %s\n", err)
return err
}
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/store_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func InitPublishers(sc *StoreConfig, browserHeadless bool) (curls []shared.Publi
if b.Disable {
continue
}
if p, err = publisher.NewBrowserPublisher(b.Name, browserUserDataDir(), browserHeadless); err != nil {
p, err = publisher.NewBrowserPublisher(b.Name, browserUserDataDir(), browserHeadless)
if err != nil {
return
}
browsers = append(browsers, p)
Expand Down
1 change: 1 addition & 0 deletions cmd/upload_help_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ func TestDo(t *testing.T) {
// err := notify(nil, req, publish(req))

// fmt.Println(err)

}
29 changes: 14 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,26 @@ require (
github.com/ysmood/gson v0.7.3
)

require (
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/go-git/go-git/v5 v5.3.0
github.com/go-rod/rod v0.112.6
github.com/hashicorp/go-plugin v1.4.8
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jedib0t/go-pretty/v6 v6.4.4
github.com/mitchellh/go-homedir v1.1.0
github.com/shogo82148/androidbinary v1.0.3
github.com/spf13/pflag v1.0.5 // indirect
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.1.0 // indirect
github.com/go-git/go-billy/v5 v5.4.0 // indirect
github.com/golang/protobuf v1.3.4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
Expand All @@ -42,16 +54,3 @@ require (
google.golang.org/grpc v1.27.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

require (
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/go-git/go-git/v5 v5.3.0
github.com/go-rod/rod v0.112.6
github.com/hashicorp/go-plugin v1.4.8
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jedib0t/go-pretty/v6 v6.4.4
github.com/mitchellh/go-homedir v1.1.0
github.com/shogo82148/androidbinary v1.0.3
github.com/spf13/pflag v1.0.5 // indirect
gopkg.in/yaml.v3 v3.0.1
)
7 changes: 4 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aev
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-billy/v5 v5.1.0 h1:4pl5BV4o7ZG/lterP4S6WzJ6xr49Ba5ET9ygheTYahk=
github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-billy/v5 v5.4.0 h1:Vaw7LaSTRJOUric7pe4vnzBSgyuf2KrLsu2Y4ZpQBDE=
github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc=
Expand All @@ -54,9 +55,8 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQLReU=
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM=
Expand Down Expand Up @@ -191,6 +191,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down

0 comments on commit bce9bd4

Please sign in to comment.