49027f4151
This change causes the linter to be a bit more complainy. The hope is that this will cut down on some of the more pedantic issues being caught in code reviews, and thus reduce the overall time a change spends in the review process. This change includes various changes to the codebase to bring it up to the new standards. Change-Id: I570d304bca5554404354f972d8a2743279a0171b
17 lines
299 B
Go
17 lines
299 B
Go
package util
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"os"
|
|
)
|
|
|
|
// WriteFiles write multiple files described in a map
|
|
func WriteFiles(fls map[string][]byte, mode os.FileMode) error {
|
|
for fileName, data := range fls {
|
|
if err := ioutil.WriteFile(fileName, data, mode); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|