Skip to content

Commit 432e919

Browse files
committed
upgrade to frog v010.0 to stop escaping quotes in log lines
* also update other deps * swap out deprecated ioutil.WriteFile for os.WriteFile
1 parent 7351035 commit 432e919

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MIT License
2-
Copyright © 2023 Dan Brakeley
2+
Copyright © 2023-2024 Dan Brakeley
33
Copyright © 2021-2023 Proletariat, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy

cmd/longtest/setup.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"encoding/binary"
55
"fmt"
6-
"io/ioutil"
76
"os"
87
"path/filepath"
98

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

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

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

go.mod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ go 1.16
55
require (
66
github.com/BurntSushi/toml v1.2.1
77
github.com/danbrakeley/bsh v0.1.5
8-
github.com/danbrakeley/frog v0.9.3
9-
github.com/magefile/mage v1.14.0
10-
github.com/mattn/go-isatty v0.0.18 // indirect
11-
golang.org/x/sys v0.7.0 // indirect
8+
github.com/danbrakeley/frog v0.10.0
9+
github.com/magefile/mage v1.15.0
10+
github.com/mattn/go-isatty v0.0.20 // indirect
11+
github.com/mattn/go-tty v0.0.5 // indirect
12+
golang.org/x/sys v0.17.0 // indirect
1213
)

go.sum

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,28 @@ github.com/danbrakeley/commandline v1.0.0 h1:9qOX7wnJxECT0ZEZav6P5/GVdX/xSsPnIwQ
66
github.com/danbrakeley/commandline v1.0.0/go.mod h1:TebcfPCZN3Dpc0DZMp68KTbVzCr07KCfAVkrYlLi2is=
77
github.com/danbrakeley/frog v0.9.3 h1:Ckj+qh2yOt/wuf41cb+GRnOyQfy+6wjJMU+uBj0JReY=
88
github.com/danbrakeley/frog v0.9.3/go.mod h1:p2AWOH3knZHylnQLcDqoR633mOi6UMpFVPzV9iTNPUg=
9+
github.com/danbrakeley/frog v0.9.5 h1:2FSXFDOrmXfGsmP/ZYzUEms3RawvAuWImugT+dxkdIY=
10+
github.com/danbrakeley/frog v0.9.5/go.mod h1:p2AWOH3knZHylnQLcDqoR633mOi6UMpFVPzV9iTNPUg=
11+
github.com/danbrakeley/frog v0.10.0 h1:YtORqrv+3J0w/1t7GKl/I3+cDfI2xhEFKDRC5ARCYJM=
12+
github.com/danbrakeley/frog v0.10.0/go.mod h1:p2AWOH3knZHylnQLcDqoR633mOi6UMpFVPzV9iTNPUg=
913
github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
1014
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
1115
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
16+
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
17+
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
1218
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
1319
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
1420
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
1521
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
1622
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
1723
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
24+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
25+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
1826
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
1927
github.com/mattn/go-tty v0.0.4 h1:NVikla9X8MN0SQAqCYzpGyXv0jY7MNl3HOWD2dkle7E=
2028
github.com/mattn/go-tty v0.0.4/go.mod h1:u5GGXBtZU6RQoKV8gY5W6UhMudbR5vXnUe7j3pxse28=
29+
github.com/mattn/go-tty v0.0.5 h1:s09uXI7yDbXzzTTfw3zonKFzwGkyYlgU3OMjqA0ddz4=
30+
github.com/mattn/go-tty v0.0.5/go.mod h1:u5GGXBtZU6RQoKV8gY5W6UhMudbR5vXnUe7j3pxse28=
2131
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
2232
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
2333
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -26,3 +36,5 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2636
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2737
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
2838
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
39+
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
40+
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

0 commit comments

Comments
 (0)