|
|
@ -94,6 +94,17 @@ func (i FakeInvoke) CommandWithContext(ctx context.Context, name string, arg ...
|
|
|
|
|
|
|
|
|
|
|
|
var ErrNotImplementedError = errors.New("not implemented yet")
|
|
|
|
var ErrNotImplementedError = errors.New("not implemented yet")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ReadFile reads contents from a file
|
|
|
|
|
|
|
|
func ReadFile(filename string) (string, error) {
|
|
|
|
|
|
|
|
content, err := ioutil.ReadFile(filename)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return "", err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return string(content), nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ReadLines reads contents from a file and splits them by new lines.
|
|
|
|
// ReadLines reads contents from a file and splits them by new lines.
|
|
|
|
// A convenience wrapper to ReadLinesOffsetN(filename, 0, -1).
|
|
|
|
// A convenience wrapper to ReadLinesOffsetN(filename, 0, -1).
|
|
|
|
func ReadLines(filename string) ([]string, error) {
|
|
|
|
func ReadLines(filename string) ([]string, error) {
|
|
|
|