backend/pkg/config/config_test.go

26 lines
386 B
Go
Raw Permalink Normal View History

2022-01-11 00:48:03 +08:00
package config
import (
"fmt"
2022-01-11 04:00:39 +08:00
"io/ioutil"
"net/http"
2022-01-11 00:48:03 +08:00
"testing"
)
type config struct {
Redis string `json:"redis,omitempty"`
Es string `json:"es,omitempty"`
}
func TestEnv(t *testing.T) {
2022-01-11 04:00:39 +08:00
resp, err := http.Get("http://api-lark-test/user")
b, _ := ioutil.ReadAll(resp.Body)
t.Log(string(b))
2022-01-11 00:48:03 +08:00
env, err := GetEnv()
if err != nil {
fmt.Println(err)
}
fmt.Println(env)
}