Merge pull request #1039 from mat007/fix-filepath-usage

Use filepath.Base instead of path.Base
This commit is contained in:
Sebastiaan van Stijn 2018-05-11 18:06:23 +02:00 committed by GitHub
commit a6b10c2e85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ package kubernetes
import ( import (
"io/ioutil" "io/ioutil"
"path" "path/filepath"
"sort" "sort"
"github.com/docker/cli/kubernetes/compose/v1beta2" "github.com/docker/cli/kubernetes/compose/v1beta2"
@ -37,7 +37,7 @@ func (s *stack) createFileBasedConfigMaps(configMaps corev1.ConfigMapInterface)
continue continue
} }
fileName := path.Base(config.File) fileName := filepath.Base(config.File)
content, err := ioutil.ReadFile(config.File) content, err := ioutil.ReadFile(config.File)
if err != nil { if err != nil {
return err return err
@ -77,7 +77,7 @@ func (s *stack) createFileBasedSecrets(secrets corev1.SecretInterface) error {
continue continue
} }
fileName := path.Base(secret.File) fileName := filepath.Base(secret.File)
content, err := ioutil.ReadFile(secret.File) content, err := ioutil.ReadFile(secret.File)
if err != nil { if err != nil {
return err return err