@@ -27,7 +27,7 @@ func newMockClient(_, _, _ string) (api.Client, error) {
2727}
2828
2929// Login will login the user and get the response.
30- func (c * mockClient ) Login () (* api.AuthResponse , error ) {
30+ func (* mockClient ) Login () (* api.AuthResponse , error ) {
3131 return & api.AuthResponse {}, nil
3232}
3333
@@ -45,7 +45,7 @@ func (c *mockClient) CreateEnvironment(create *api.EnvironmentCreate) (*api.Envi
4545 }
4646
4747 if existed := c .findEnvironmentByName (env .Name ); existed != nil {
48- return nil , errors .Errorf ("Environment %s already exists. " , create .Name )
48+ return nil , errors .Errorf ("Environment %s already exists" , create .Name )
4949 }
5050 c .environmentMap [env .ID ] = env
5151
@@ -56,15 +56,15 @@ func (c *mockClient) CreateEnvironment(create *api.EnvironmentCreate) (*api.Envi
5656func (c * mockClient ) GetEnvironment (environmentID int ) (* api.Environment , error ) {
5757 env , ok := c .environmentMap [environmentID ]
5858 if ! ok {
59- return nil , errors .Errorf ("Cannot found environment with ID %d. " , environmentID )
59+ return nil , errors .Errorf ("Cannot found environment with ID %d" , environmentID )
6060 }
6161
6262 return env , nil
6363}
6464
6565// ListEnvironment finds all environments.
66- func (c * mockClient ) ListEnvironment () ([]* api.Environment , error ) {
67- return nil , errors .Errorf ("ListEnvironment is not implemented yet. " )
66+ func (* mockClient ) ListEnvironment () ([]* api.Environment , error ) {
67+ return nil , errors .Errorf ("ListEnvironment is not implemented yet" )
6868}
6969
7070// UpdateEnvironment updates the environment.
@@ -82,7 +82,7 @@ func (c *mockClient) UpdateEnvironment(environmentID int, patch *api.Environment
8282 }
8383
8484 if existed := c .findEnvironmentByName (env .Name ); existed != nil {
85- return nil , errors .Errorf ("Environment %s already exists. " , env .Name )
85+ return nil , errors .Errorf ("Environment %s already exists" , env .Name )
8686 }
8787
8888 delete (c .environmentMap , env .ID )
@@ -107,26 +107,26 @@ func (c *mockClient) findEnvironmentByName(envName string) *api.Environment {
107107}
108108
109109// ListInstance will return all instances.
110- func (c * mockClient ) ListInstance () ([]* api.Instance , error ) {
111- return nil , errors .Errorf ("ListInstance is not implemented yet. " )
110+ func (* mockClient ) ListInstance () ([]* api.Instance , error ) {
111+ return nil , errors .Errorf ("ListInstance is not implemented yet" )
112112}
113113
114114// CreateInstance creates the instance.
115- func (c * mockClient ) CreateInstance (create * api.InstanceCreate ) (* api.Instance , error ) {
116- return nil , errors .Errorf ("CreateInstance is not implemented yet. " )
115+ func (* mockClient ) CreateInstance (_ * api.InstanceCreate ) (* api.Instance , error ) {
116+ return nil , errors .Errorf ("CreateInstance is not implemented yet" )
117117}
118118
119119// GetInstance gets the instance by id.
120- func (c * mockClient ) GetInstance (instanceID int ) (* api.Instance , error ) {
121- return nil , errors .Errorf ("GetInstance is not implemented yet. " )
120+ func (* mockClient ) GetInstance (_ int ) (* api.Instance , error ) {
121+ return nil , errors .Errorf ("GetInstance is not implemented yet" )
122122}
123123
124124// UpdateInstance updates the instance.
125- func (c * mockClient ) UpdateInstance (instanceID int , patch * api.InstancePatch ) (* api.Instance , error ) {
126- return nil , errors .Errorf ("UpdateInstance is not implemented yet. " )
125+ func (* mockClient ) UpdateInstance (_ int , _ * api.InstancePatch ) (* api.Instance , error ) {
126+ return nil , errors .Errorf ("UpdateInstance is not implemented yet" )
127127}
128128
129129// DeleteInstance deletes the instance.
130- func (c * mockClient ) DeleteInstance (instanceID int ) error {
131- return errors .Errorf ("DeleteInstance is not implemented yet. " )
130+ func (* mockClient ) DeleteInstance (_ int ) error {
131+ return errors .Errorf ("DeleteInstance is not implemented yet" )
132132}
0 commit comments