Skip to content

Commit a997ae5

Browse files
authored
Merge pull request #133 from itchyny/bump-deps-20220711
Update dependencies
2 parents 70f6b48 + 70d9bb6 commit a997ae5

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

export.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"os"
76
"path/filepath"
87
"strings"
@@ -25,7 +24,7 @@ func exportUpstart(cfg *config, path string) error {
2524
if err != nil {
2625
return err
2726
}
28-
b, err := ioutil.ReadFile(filepath.Join(filepath.Dir(procfile), ".env"))
27+
b, err := os.ReadFile(filepath.Join(filepath.Dir(procfile), ".env"))
2928
if err == nil {
3029
for _, line := range strings.Split(string(b), "\n") {
3130
token := strings.SplitN(line, "=", 2)

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
module github.com/mattn/goreman
22

3-
go 1.13
3+
go 1.17
44

55
require (
66
github.com/joho/godotenv v1.4.0
77
github.com/mattn/go-colorable v0.1.12
8-
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7
9-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
8+
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d
9+
gopkg.in/yaml.v3 v3.0.1
1010
)
11+
12+
require github.com/mattn/go-isatty v0.0.14 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9
66
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
77
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
88
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
9-
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 h1:8IVLkfbr2cLhv0a/vKq4UFUcJym8RmDoDboxCFWEjYE=
10-
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
9+
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d h1:/m5NbqQelATgoSPVC2Z23sR4kVNokFwDDyWh/3rGY+I=
10+
golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1111
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1212
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
13-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
14-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
13+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
14+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

goreman_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"context"
5-
"io/ioutil"
65
"os"
76
"os/exec"
87
"path/filepath"
@@ -23,13 +22,13 @@ func TestMain(m *testing.M) {
2322
}
2423

2524
code := `package main;import ("os";"strconv";"time");func main(){i,_:=strconv.ParseFloat(os.Args[1]);time.Sleep(time.Duration(i)*time.Second)}`
26-
dir, err := ioutil.TempDir("", "goreman-test")
25+
dir, err := os.MkdirTemp("", "goreman-test")
2726
if err != nil {
2827
panic(err)
2928
}
3029
sleep = filepath.Join(dir, "sleep.exe")
3130
src := filepath.Join(dir, "sleep.go")
32-
err = ioutil.WriteFile(src, []byte(code), 0644)
31+
err = os.WriteFile(src, []byte(code), 0644)
3332
if err != nil {
3433
panic(err)
3534
}
@@ -51,7 +50,7 @@ func TestMain(m *testing.M) {
5150

5251
func startGoreman(ctx context.Context, t *testing.T, ch <-chan os.Signal, file []byte) error {
5352
t.Helper()
54-
f, err := ioutil.TempFile("", "")
53+
f, err := os.CreateTemp("", "")
5554
if err != nil {
5655
t.Fatal(err)
5756
}

main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"errors"
66
"flag"
77
"fmt"
8-
"io/ioutil"
98
"os"
109
"os/exec"
1110
"regexp"
@@ -129,7 +128,7 @@ func readConfig() *config {
129128
cfg.ExitOnError = *exitOnError
130129
cfg.Args = flag.Args()
131130

132-
b, err := ioutil.ReadFile(".goreman")
131+
b, err := os.ReadFile(".goreman")
133132
if err == nil {
134133
yaml.Unmarshal(b, &cfg)
135134
}
@@ -138,7 +137,7 @@ func readConfig() *config {
138137

139138
// read Procfile and parse it.
140139
func readProcfile(cfg *config) error {
141-
content, err := ioutil.ReadFile(cfg.Procfile)
140+
content, err := os.ReadFile(cfg.Procfile)
142141
if err != nil {
143142
return err
144143
}

0 commit comments

Comments
 (0)