Skip to content

Commit 2ac0f35

Browse files
committed
plugin: fix year in license banner
1 parent e2a58e4 commit 2ac0f35

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

plugin.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 go-dockerclient authors. All rights reserved.
1+
// Copyright 2018 go-dockerclient authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

@@ -147,21 +147,20 @@ type PluginConfig struct {
147147
//
148148
// See https://goo.gl/C4t7Tz for more details.
149149
type PluginDetail struct {
150-
ID string `json:"Id,omitempty" yaml:"Id,omitempty" toml:"Id,omitempty"`
151-
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
152-
Tag string `json:"Tag,omitempty" yaml:"Tag,omitempty" toml:"Tag,omitempty"`
153-
Active bool `json:"Active,omitempty" yaml:"Active,omitempty" toml:"Active,omitempty"`
150+
ID string `json:"Id,omitempty" yaml:"Id,omitempty" toml:"Id,omitempty"`
151+
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
152+
Tag string `json:"Tag,omitempty" yaml:"Tag,omitempty" toml:"Tag,omitempty"`
153+
Active bool `json:"Active,omitempty" yaml:"Active,omitempty" toml:"Active,omitempty"`
154154
Settings PluginSettings `json:"Settings,omitempty" yaml:"Settings,omitempty" toml:"Settings,omitempty"`
155-
Config PluginConfig `json:"Config,omitempty" yaml:"Config,omitempty" toml:"Config,omitempty"`
155+
Config PluginConfig `json:"Config,omitempty" yaml:"Config,omitempty" toml:"Config,omitempty"`
156156
}
157157

158158
// ListPlugins returns pluginDetails or an error.
159159
//
160160
// See https://goo.gl/C4t7Tz for more details.
161161
func (c *Client) ListPlugins(ctx context.Context) ([]PluginDetail, error) {
162162
resp, err := c.do("GET", "/plugins", doOptions{
163-
context:ctx,
164-
163+
context: ctx,
165164
})
166165
if err != nil {
167166
return nil, err
@@ -177,9 +176,9 @@ func (c *Client) ListPlugins(ctx context.Context) ([]PluginDetail, error) {
177176
// GetPluginPrivileges returns pulginPrivileges or an error.
178177
//
179178
// See https://goo.gl/C4t7Tz for more details.
180-
func (c *Client) GetPluginPrivileges(name string,ctx context.Context) ([]PluginPrivilege, error) {
179+
func (c *Client) GetPluginPrivileges(name string, ctx context.Context) ([]PluginPrivilege, error) {
181180
resp, err := c.do("GET", "/plugins/privileges?remote="+name, doOptions{
182-
context:ctx,
181+
context: ctx,
183182
})
184183
if err != nil {
185184
return nil, err
@@ -197,7 +196,7 @@ func (c *Client) GetPluginPrivileges(name string,ctx context.Context) ([]PluginP
197196
// See https://goo.gl/C4t7Tz for more details.
198197
func (c *Client) InspectPlugins(name string, ctx context.Context) (*PluginDetail, error) {
199198
resp, err := c.do("GET", "/plugins/"+name+"/json", doOptions{
200-
context:ctx,
199+
context: ctx,
201200
})
202201
if err != nil {
203202
return nil, err

plugins_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2018 go-dockerclient authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
package docker
26

37
import (
@@ -196,7 +200,7 @@ func TestGetPluginPrivileges(t *testing.T) {
196200
Description: "",
197201
Value: []string{"host"},
198202
}}
199-
pluginPrivileges, err := client.GetPluginPrivileges(name,context.Background())
203+
pluginPrivileges, err := client.GetPluginPrivileges(name, context.Background())
200204
if err != nil {
201205
t.Fatal(err)
202206
}
@@ -216,7 +220,7 @@ func TestInstallPlugins(t *testing.T) {
216220
},
217221
},
218222
Context: context.Background(),
219-
Auth: AuthConfiguration{},
223+
Auth: AuthConfiguration{},
220224
}
221225

222226
client := newTestClient(&FakeRoundTripper{message: "", status: http.StatusOK})
@@ -230,7 +234,7 @@ func TestInspectPlugin(t *testing.T) {
230234
name := "test_plugin"
231235
fakeRT := &FakeRoundTripper{message: jsonPluginDetail, status: http.StatusNoContent}
232236
client := newTestClient(fakeRT)
233-
pluginPrivileges, err := client.InspectPlugins(name,context.Background())
237+
pluginPrivileges, err := client.InspectPlugins(name, context.Background())
234238
if err != nil {
235239
t.Fatal(err)
236240
}

0 commit comments

Comments
 (0)