fix body building

master
Paulo Simão 2021-10-10 20:54:58 -03:00
parent f0a5dd5025
commit 74d2014541
1 changed files with 9 additions and 2 deletions

11
lib.go
View File

@ -17,11 +17,9 @@ type Cli struct {
func (c *Cli) BasePath() string {
return c.basePath
}
func (c *Cli) SetBasePath(basePath string) {
c.basePath = basePath
}
func (c *Cli) AddHeader(k string, v string) {
c.headers[k] = v
}
@ -135,3 +133,12 @@ func NewCli() *Cli {
}
return ret
}
var cli *Cli
func C() *Cli {
if cli == nil {
cli = NewCli()
}
return cli
}