(path string, content string)
| 125 | } |
| 126 | |
| 127 | func (self *Shell) UpdateFile(path string, content string) *Shell { |
| 128 | fullPath := filepath.Join(self.dir, path) |
| 129 | err := os.WriteFile(fullPath, []byte(content), 0o644) |
| 130 | if err != nil { |
| 131 | self.fail(fmt.Sprintf("error updating file: %s\n%s", fullPath, err)) |
| 132 | } |
| 133 | |
| 134 | return self |
| 135 | } |
| 136 | |
| 137 | func (self *Shell) NewBranch(name string) *Shell { |
| 138 | return self.RunCommand([]string{"git", "checkout", "-b", name}) |
no test coverage detected