INNER CODE UNIT · Go

writeFile

kubernetes/k8s.io · infra/aws/aws-costexplorer-export/main.go:165

func writeFile(path string, contents string) error {
	f, err := os.Create(path)
	if err != nil {
		return err
	}
	defer f.Close()
	_, err = f.WriteString(contents)
	if err != nil {
		return err
	}
	return nil
}

func stringForStringPointer(input *string) string {
	if input == nil {
		return ""
	}
	return *input

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…