mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
9441e46e4b
Remove "failed" from wrapped errors Where appropriate rephrase "unable to/could not" to "failed" in root errors Start error log messages with "Failed"
21 lines
384 B
Go
21 lines
384 B
Go
package gcp
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/afero"
|
|
)
|
|
|
|
// Writer implements ConfigWriter.
|
|
type Writer struct {
|
|
fs afero.Afero
|
|
}
|
|
|
|
// WriteGCEConf persists the GCE config on disk.
|
|
func (w *Writer) WriteGCEConf(config string) error {
|
|
if err := w.fs.WriteFile("/etc/gce.conf", []byte(config), 0o644); err != nil {
|
|
return fmt.Errorf("writing gce config: %w", err)
|
|
}
|
|
return nil
|
|
}
|