mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-11-22 04:53:46 +00:00
removed unnecessary byte slice conversions
This commit is contained in:
parent
cf1071b389
commit
25229f9c81
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ func makeLocal(zone *ZoneRequest) error {
|
|||
return fmt.Errorf("file %s already exists: %w", zone.FileName, err)
|
||||
}
|
||||
|
||||
if len([]byte(zone.Body)) == 0 {
|
||||
if len(zone.Body) == 0 {
|
||||
return errEmptyFile
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ func makeLocal(zone *ZoneRequest) error {
|
|||
}
|
||||
}()
|
||||
|
||||
err = os.WriteFile(f.Name(), []byte(zone.Body), 0o600)
|
||||
err = os.WriteFile(f.Name(), zone.Body, 0o600)
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to write file locally: %w", err)
|
||||
|
|
Loading…
Reference in a new issue