fix linting errors
This commit is contained in:
parent
9ed42521c8
commit
eb574f9ad7
@ -100,11 +100,13 @@ func (c *Container) URI() string {
|
||||
|
||||
func (c *Container) SetURI(uri string) error {
|
||||
resourceUri, e := url.Parse(uri)
|
||||
if e == nil {
|
||||
if resourceUri.Scheme == c.Type() {
|
||||
c.Name, e = filepath.Abs(filepath.Join(resourceUri.Hostname(), resourceUri.RequestURI()))
|
||||
} else {
|
||||
e = fmt.Errorf("%w: %s is not a %s", ErrInvalidResourceURI, uri, c.Type())
|
||||
}
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ func TestReadContainer(t *testing.T) {
|
||||
state: present
|
||||
`
|
||||
m := &mocks.MockContainerClient{
|
||||
InjectContainerList: func(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) {
|
||||
InjectContainerList: func(ctx context.Context, options container.ListOptions) ([]types.Container, error) {
|
||||
return []types.Container{
|
||||
{ID: "123456789abc"},
|
||||
{ID: "123456789def"},
|
||||
|
Loading…
Reference in New Issue
Block a user