linter fixes

This commit is contained in:
ston1th 2021-11-07 11:57:25 +01:00
commit ffb356182e
4 changed files with 8 additions and 11 deletions

View file

@ -313,7 +313,7 @@ func (o *ServerTemplateOpts) Validate(ctx context.Context, c *Client) error {
return nil
}
func (o ServerTemplateOpts) body() httpbody {
func (o *ServerTemplateOpts) body() httpbody {
body := httpbody{"name": o.Name}
if o.TargetStorage != "" {
body["storage"] = o.TargetStorage
@ -325,7 +325,7 @@ func (o ServerTemplateOpts) body() httpbody {
return body
}
func (c *ServerClient) CreateFromTemplate(ctx context.Context, opts ServerTemplateOpts) (t *Task, url string, err error) {
func (c *ServerClient) CreateFromTemplate(ctx context.Context, opts *ServerTemplateOpts) (t *Task, url string, err error) {
err = opts.Validate(ctx, c.client)
if err != nil {
return