Skip to content

Commit

Permalink
fix golint
Browse files Browse the repository at this point in the history
  • Loading branch information
tejal29 committed Nov 7, 2019
1 parent 4dd22a0 commit c030929
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/commands/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func Test_addDefaultHOME(t *testing.T) {
user: "www-add",
mockUser: &user.User{
Username: "www-add",
HomeDir: "some-other",
HomeDir: "some-other",
},
initial: []string{
"PATH=/something/else",
Expand Down Expand Up @@ -113,8 +113,8 @@ func Test_addDefaultHOME(t *testing.T) {
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
userLookup = func(username string) ( *user.User, error) { return test.mockUser, nil}
defer func() {userLookup = user.Lookup}()
userLookup = func(username string) (*user.User, error) { return test.mockUser, nil }
defer func() { userLookup = user.Lookup }()
actual := addDefaultHOME(test.user, test.initial)
testutil.CheckErrorAndDeepEqual(t, false, nil, test.expected, actual)
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/fs_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func GetFSFromImage(root string, img v1.Image) ([]string, error) {

for i, l := range layers {
if mediaType, err := l.MediaType(); err == nil {
logrus.Debugf("Extracting layer %d of media type %s", mediaType)
logrus.Debugf("Extracting layer %d of media type %s", i, mediaType)
} else {
logrus.Debugf("Extracting layer %d", i)
}
Expand Down

0 comments on commit c030929

Please sign in to comment.