Skip to content

Commit

Permalink
fix: 强绑定 client 结构体到 IClient 接口
Browse files Browse the repository at this point in the history
  • Loading branch information
daixijun committed Mar 9, 2021
1 parent 54664bd commit b7a427f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import (
"strings"
)

type Client interface {
var _ IClient = (*client)(nil)

type IClient interface {
Login(ctx context.Context, username, password, eauth string) error
Logout(ctx context.Context) error
ListMinions(ctx context.Context) (*MinionResponse, error)
Expand All @@ -34,7 +36,7 @@ type client struct {
// Token string
}

func NewClient(baseAPI string, skipVerify bool) Client {
func NewClient(baseAPI string, skipVerify bool) IClient {
tr := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: skipVerify,
Expand Down

0 comments on commit b7a427f

Please sign in to comment.