mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(api): use a standard stack identifier (#1980)
This commit is contained in:
parent
da5a430b8c
commit
b4c2820ad7
14 changed files with 150 additions and 38 deletions
|
@ -186,6 +186,11 @@ func (service *Service) GetFileContent(filePath string) (string, error) {
|
|||
return string(content), nil
|
||||
}
|
||||
|
||||
// Rename renames a file or directory
|
||||
func (service *Service) Rename(oldPath, newPath string) error {
|
||||
return os.Rename(oldPath, newPath)
|
||||
}
|
||||
|
||||
// WriteJSONToFile writes JSON to the specified file.
|
||||
func (service *Service) WriteJSONToFile(path string, content interface{}) error {
|
||||
jsonContent, err := json.Marshal(content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue