(path string)
| 168 | } |
| 169 | |
| 170 | func (w *workspaceDocument) save(path string) error { |
| 171 | content, err := json.MarshalIndent(w, "", " ") |
| 172 | if err != nil { |
| 173 | return err |
| 174 | } |
| 175 | |
| 176 | mode := fs.FileMode(0o644) |
| 177 | if info, statErr := os.Stat(path); statErr == nil { |
| 178 | mode = info.Mode().Perm() |
| 179 | } |
| 180 | return os.WriteFile(path, content, mode) |
| 181 | } |
| 182 | |
| 183 | func (w *workspaceDocument) list(kind workspaceList) []string { |
| 184 | switch kind { |
no outgoing calls
no test coverage detected