From b7a427f38003193f0f1084b4af25fff3a03f2a48 Mon Sep 17 00:00:00 2001 From: Xijun Dai Date: Tue, 9 Mar 2021 11:59:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=BA=E7=BB=91=E5=AE=9A=20client=20?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BD=93=E5=88=B0=20IClient=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 10acf59..66ab274 100644 --- a/client.go +++ b/client.go @@ -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) @@ -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,