mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 02:51:55 +00:00
metadata: print Entry objects with %+v not %s
go_vet (via https://goreportcard.com/report/github.com/linuxkit/linuxkit) reported: error: arg current for printf verb %s of wrong type: main.Entry (vet) For each of these. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
a4230b74aa
commit
826ee28c8d
@ -165,7 +165,7 @@ func writeConfigFiles(target string, current Entry) {
|
|||||||
if isFile(current) {
|
if isFile(current) {
|
||||||
filemode, err := parseFileMode(current.Perm, 0644)
|
filemode, err := parseFileMode(current.Perm, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed to parse permission %s: %s", current, err)
|
log.Printf("Failed to parse permission %+v: %s", current, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := ioutil.WriteFile(target, []byte(*current.Content), filemode); err != nil {
|
if err := ioutil.WriteFile(target, []byte(*current.Content), filemode); err != nil {
|
||||||
@ -175,7 +175,7 @@ func writeConfigFiles(target string, current Entry) {
|
|||||||
} else if isDirectory(current) {
|
} else if isDirectory(current) {
|
||||||
filemode, err := parseFileMode(current.Perm, 0755)
|
filemode, err := parseFileMode(current.Perm, 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed to parse permission %s: %s", current, err)
|
log.Printf("Failed to parse permission %+v: %s", current, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := os.MkdirAll(target, filemode); err != nil {
|
if err := os.MkdirAll(target, filemode); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user