Skip to content

Commit

Permalink
upgrade to frog v010.0 to stop escaping quotes in log lines
Browse files Browse the repository at this point in the history
* also update other deps
* swap out deprecated ioutil.WriteFile for os.WriteFile
  • Loading branch information
danbrakeley committed Feb 24, 2024
1 parent 7351035 commit 432e919
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MIT License
Copyright © 2023 Dan Brakeley
Copyright © 2023-2024 Dan Brakeley
Copyright © 2021-2023 Proletariat, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
7 changes: 3 additions & 4 deletions cmd/longtest/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"encoding/binary"
"fmt"
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -139,7 +138,7 @@ func addFile(server *p4.P4, cl int64, filename, p4type, contents string) error {
if err := os.MkdirAll(filepath.Dir(abs), os.ModePerm); err != nil {
return fmt.Errorf("error creating dir %s: %w", filepath.Dir(abs), err)
}
if err := ioutil.WriteFile(abs, []byte(contents), 0666); err != nil {
if err := os.WriteFile(abs, []byte(contents), 0666); err != nil {
return fmt.Errorf("error writing to %s: %w", abs, err)
}
return server.Add([]string{abs}, p4.Type(p4type), p4.Changelist(cl), p4.DoNotIgnore)
Expand Down Expand Up @@ -173,12 +172,12 @@ func addAppleFile(server *p4.P4, cl int64, filename, resource, data string) erro

// then write the resource fork
path := filepath.Join(filepath.Dir(abs), "%"+filepath.Base(abs))
if err := ioutil.WriteFile(path, b, 0666); err != nil {
if err := os.WriteFile(path, b, 0666); err != nil {
return fmt.Errorf("error writing Apple Double resource fork to %s: %w", path, err)
}

// second write the data to the data fork file
if err := ioutil.WriteFile(abs, []byte(data), 0666); err != nil {
if err := os.WriteFile(abs, []byte(data), 0666); err != nil {
return fmt.Errorf("error writing Apple Double data fork to %s: %w", abs, err)
}

Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ go 1.16
require (
github.com/BurntSushi/toml v1.2.1
github.com/danbrakeley/bsh v0.1.5
github.com/danbrakeley/frog v0.9.3
github.com/magefile/mage v1.14.0
github.com/mattn/go-isatty v0.0.18 // indirect
golang.org/x/sys v0.7.0 // indirect
github.com/danbrakeley/frog v0.10.0
github.com/magefile/mage v1.15.0
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-tty v0.0.5 // indirect
golang.org/x/sys v0.17.0 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,28 @@ github.com/danbrakeley/commandline v1.0.0 h1:9qOX7wnJxECT0ZEZav6P5/GVdX/xSsPnIwQ
github.com/danbrakeley/commandline v1.0.0/go.mod h1:TebcfPCZN3Dpc0DZMp68KTbVzCr07KCfAVkrYlLi2is=
github.com/danbrakeley/frog v0.9.3 h1:Ckj+qh2yOt/wuf41cb+GRnOyQfy+6wjJMU+uBj0JReY=
github.com/danbrakeley/frog v0.9.3/go.mod h1:p2AWOH3knZHylnQLcDqoR633mOi6UMpFVPzV9iTNPUg=
github.com/danbrakeley/frog v0.9.5 h1:2FSXFDOrmXfGsmP/ZYzUEms3RawvAuWImugT+dxkdIY=
github.com/danbrakeley/frog v0.9.5/go.mod h1:p2AWOH3knZHylnQLcDqoR633mOi6UMpFVPzV9iTNPUg=
github.com/danbrakeley/frog v0.10.0 h1:YtORqrv+3J0w/1t7GKl/I3+cDfI2xhEFKDRC5ARCYJM=
github.com/danbrakeley/frog v0.10.0/go.mod h1:p2AWOH3knZHylnQLcDqoR633mOi6UMpFVPzV9iTNPUg=
github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-tty v0.0.4 h1:NVikla9X8MN0SQAqCYzpGyXv0jY7MNl3HOWD2dkle7E=
github.com/mattn/go-tty v0.0.4/go.mod h1:u5GGXBtZU6RQoKV8gY5W6UhMudbR5vXnUe7j3pxse28=
github.com/mattn/go-tty v0.0.5 h1:s09uXI7yDbXzzTTfw3zonKFzwGkyYlgU3OMjqA0ddz4=
github.com/mattn/go-tty v0.0.5/go.mod h1:u5GGXBtZU6RQoKV8gY5W6UhMudbR5vXnUe7j3pxse28=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand All @@ -26,3 +36,5 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

0 comments on commit 432e919

Please sign in to comment.