Files
graylog-project-cli/utils/rename_unix.go
Bernd Ahlers 7c0d09db34 Add new command to generate IntelliJ run configurations (#48)
* Add google/renameio/v2 dependency
* Add new command to generate IntelliJ run configurations
* Detect the OpenSearch version for the Data Node config
* Use .template as template file suffix
  The regenerate command picks up all ".xml.tmpl" files in the repository
  and fails on the run configuration template.
  So we use a different suffix to avoid that issue.
* Update dependencies
* Warn users about hostname setup in /etc/hosts
  On Linux the *.localhost hostnames work automatically. On other
  operating systems the users have to add the names to /etc/hosts.
2025-02-27 10:20:42 +01:00

16 lines
264 B
Go

//go:build !windows
package utils
import (
"github.com/google/renameio/v2"
"os"
)
func AtomicallyWriteFile(filename string, data []byte, perm os.FileMode) error {
if err := renameio.WriteFile(filename, data, perm); err != nil {
return err
}
return nil
}