Skip to content

Commit

Permalink
access token
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongdalu-trechina committed Mar 15, 2024
1 parent c3013b1 commit 35955de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/test_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func genTest(cmd *cobra.Command, _ []string) {
log.Fatalf("Failed generating interface: %v", err)
}

log.Printf("Generate %q interface.\n", path.Join(path.Dir(destination), "interface.go"))
log.Printf("Generate %q completed.\n", path.Join(path.Dir(destination), "interface.go"))

if err := g.Generate(); err != nil {
log.Fatalf("Failed generating client: %v", err)
Expand Down Expand Up @@ -204,6 +204,7 @@ func (g *generator) Generate() error {
CartUUID string
ClientID string
ClientSecret string
AccessToken string
}`,
)

Expand Down Expand Up @@ -299,7 +300,7 @@ func (g *generator) GenerateInterface(name string, intf map[string]spec) error {
g.p("Params: params,")
g.p("http: test.NewHTTPClientWithoutRetry(),")
g.p("endPoint: \"http://\"+viper.GetString(\"%v.http.host\")+\":\"+viper.GetString(\"%v.http.port\"),", "manju", "manju")
g.p("accessToken: \"\",")
g.p("accessToken: params.AccessToken,")
g.out()
g.p("}")
g.p("")
Expand Down

0 comments on commit 35955de

Please sign in to comment.