Skip to content

Commit c7bfd26

Browse files
author
ymqytw
committed
update pkg info and structure.
1 parent c704b66 commit c7bfd26

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

exec/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2014 The Kubernetes Authors.
2+
Copyright 2017 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -15,4 +15,4 @@ limitations under the License.
1515
*/
1616

1717
// Package exec provides an injectable interface and implementations for running commands.
18-
package exec // import "k8s.io/kubernetes/pkg/util/exec"
18+
package exec // import "k8s.io/utils/exec"

exec/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2014 The Kubernetes Authors.
2+
Copyright 2017 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

exec/exec_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2014 The Kubernetes Authors.
2+
Copyright 2017 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

exec/fake_exec.go renamed to exec/testing/fake_exec.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2014 The Kubernetes Authors.
2+
Copyright 2017 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -19,6 +19,8 @@ package exec
1919
import (
2020
"fmt"
2121
"io"
22+
23+
"k8s.io/utils/exec"
2224
)
2325

2426
// A simple scripted Interface type.
@@ -28,9 +30,9 @@ type FakeExec struct {
2830
LookPathFunc func(string) (string, error)
2931
}
3032

31-
type FakeCommandAction func(cmd string, args ...string) Cmd
33+
type FakeCommandAction func(cmd string, args ...string) exec.Cmd
3234

33-
func (fake *FakeExec) Command(cmd string, args ...string) Cmd {
35+
func (fake *FakeExec) Command(cmd string, args ...string) exec.Cmd {
3436
if fake.CommandCalls > len(fake.CommandScript)-1 {
3537
panic(fmt.Sprintf("ran out of Command() actions. Could not handle command [%d]: %s args: %v", fake.CommandCalls, cmd, args))
3638
}
@@ -58,7 +60,7 @@ type FakeCmd struct {
5860
Stderr io.Writer
5961
}
6062

61-
func InitFakeCmd(fake *FakeCmd, cmd string, args ...string) Cmd {
63+
func InitFakeCmd(fake *FakeCmd, cmd string, args ...string) exec.Cmd {
6264
fake.Argv = append([]string{cmd}, args...)
6365
return fake
6466
}

0 commit comments

Comments
 (0)