fix(apicmd): ajouter *http.Client
à apiCmd
This commit is contained in:
parent
efa12dc91e
commit
658763e8a8
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"crypto/subtle"
|
"crypto/subtle"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"git.agecem.com/agecem/bottin-agenda/data"
|
"git.agecem.com/agecem/bottin-agenda/data"
|
||||||
"git.agecem.com/agecem/bottin-agenda/handlers"
|
"git.agecem.com/agecem/bottin-agenda/handlers"
|
||||||
|
@ -34,8 +35,12 @@ var apiCmd = &cobra.Command{
|
||||||
bottinApiProtocol := viper.GetString("bottin.api.protocol")
|
bottinApiProtocol := viper.GetString("bottin.api.protocol")
|
||||||
bottinApiPort := viper.GetInt("bottin.api.port")
|
bottinApiPort := viper.GetInt("bottin.api.port")
|
||||||
|
|
||||||
|
bottinClient := http.DefaultClient
|
||||||
|
defer bottinClient.CloseIdleConnections()
|
||||||
|
|
||||||
// Using bottin's API client
|
// Using bottin's API client
|
||||||
bottinConnection := bottindata.NewApiClient(
|
bottinConnection := bottindata.NewApiClient(
|
||||||
|
bottinClient,
|
||||||
bottinApiKey,
|
bottinApiKey,
|
||||||
bottinApiHost,
|
bottinApiHost,
|
||||||
bottinApiProtocol,
|
bottinApiProtocol,
|
||||||
|
|
Loading…
Reference in a new issue