haiwai-common-sdk-go/sdk/utils/utils_test.go

26 lines
647 B
Go
Raw Normal View History

2023-02-21 20:46:05 +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)
}