7
0
gaore-common-sdk-go/sdk/utils/utils_test.go

26 lines
647 B
Go
Raw Permalink Normal View History

2020-08-04 21:14:06 +08:00
package utils
import (
"fmt"
"net/http"
"testing"
"time"
)
type TestCase struct {
Debug bool `default:"false"`
HttpTransport *http.Transport `default:""`
Transport http.RoundTripper `default:""`
GoRoutinePoolSize int `default:"5"`
UserAgent string `default:""`
Scheme string `default:"HTTP"`
Haha uintptr `default:"232"`
Timeout time.Duration `default:"5"`
}
func TestInitStructWithDefaultTag(t *testing.T) {
testcase := &TestCase{}
InitStructWithDefaultTag(testcase)
fmt.Printf("%+v", testcase)
}