-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package mode: When invoked in package mode, counterfeiter will generate an interface and shim implementation from a package in your GOPATH. Counterfeiter finds the public methods in the package <source-path> and adds those method signatures to the generated interface <interface-name>. Signed-off-by: Luke Woydziak <luke.woydziak@emc.com>
- Loading branch information
Showing
15 changed files
with
1,258 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package ostest | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"time" | ||
) | ||
|
||
func FindProcess(pid int) (*os.Process, error) { | ||
return os.FindProcess(pid) | ||
} | ||
|
||
func Hostname() (name string, err error) { | ||
return os.Hostname() | ||
} | ||
|
||
func Expand(s string, mapping func(string) string) string { | ||
return os.Expand(s, mapping) | ||
} | ||
|
||
func Clearenv() { | ||
os.Clearenv() | ||
} | ||
|
||
func Environ() []string { | ||
return os.Environ() | ||
} | ||
|
||
func Chtimes(name string, atime time.Time, mtime time.Time) error { | ||
return os.Chtimes(name, atime, mtime) | ||
} | ||
|
||
func MkdirAll(path string, perm os.FileMode) error { | ||
return os.MkdirAll(path, perm) | ||
} | ||
|
||
func Exit(code int) { | ||
os.Exit(code) | ||
} | ||
|
||
func Fictional(lol ...string) { | ||
fmt.Printf("%#v", lol) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// This file was generated by counterfeiter | ||
package osshim | ||
|
||
import ( | ||
"os" | ||
"time" | ||
) | ||
|
||
type Os interface { | ||
FindProcess(pid int) (*os.Process, error) | ||
Hostname() (name string, err error) | ||
Expand(s string, mapping func(string) string) string | ||
Clearenv() | ||
Environ() []string | ||
Chtimes(name string, atime time.Time, mtime time.Time) error | ||
MkdirAll(path string, perm os.FileMode) error | ||
Exit(code int) | ||
Fictional(lol ...string) | ||
} |
Oops, something went wrong.