/usr/share/gocode/src/github.com/smartystreets/goconvey/web/server/system/fake_shell.go is in golang-github-smartystreets-goconvey-dev 1.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | package system
type FakeShell struct {
environment map[string]string
executions []string
}
func (self *FakeShell) GoTest(directory string) (output string, err error) {
self.executions = append(self.executions, directory)
output = directory
return
}
func (self *FakeShell) Executions() []string {
return self.executions
}
func (self *FakeShell) Getenv(key string) string {
return self.environment[key]
}
func (self *FakeShell) Setenv(key, value string) error {
self.environment[key] = value
return nil
}
func NewFakeShell() *FakeShell {
self := &FakeShell{}
self.environment = map[string]string{}
self.executions = []string{}
return self
}
|