- Ran goimports to format code and imports - Removed unused module from go.mod - Added .editorconfig to keep formatting standard across contributors
18 lines
340 B
Go
18 lines
340 B
Go
package staticfiles
|
|
|
|
import (
|
|
"io/ioutil"
|
|
|
|
"github.com/hpcng/warewulf/internal/pkg/wwlog"
|
|
)
|
|
|
|
func WriteData(source string, dest string) error {
|
|
bytes, err := getResource(source)
|
|
err = ioutil.WriteFile(dest, bytes, 0644)
|
|
if err != nil {
|
|
wwlog.Printf(wwlog.ERROR, "Failed writing %s to: %s\n", dest, err)
|
|
return err
|
|
}
|
|
return nil
|
|
}
|