Skip to content

Commit 1b7eb42

Browse files
committed
Update dependencies, Go and Ubuntu version
1 parent 7c18864 commit 1b7eb42

File tree

7 files changed

+42
-430
lines changed

7 files changed

+42
-430
lines changed

.github/workflows/go.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
lint:
99
strategy:
1010
matrix:
11-
platform: [ubuntu-20.04]
12-
go-version: [1.17.x, 1.18.x]
11+
platform: [ubuntu-22.04]
12+
go-version: [1.18.x, 1.19.x]
1313
runs-on: ${{ matrix.platform }}
1414
name: Linters (Static Analysis) for Go
1515
steps:
@@ -31,8 +31,8 @@ jobs:
3131
test:
3232
strategy:
3333
matrix:
34-
platform: [ubuntu-20.04]
35-
go-version: [1.17.x, 1.18.x]
34+
platform: [ubuntu-22.04]
35+
go-version: [1.18.x, 1.19.x]
3636
runs-on: ${{ matrix.platform }}
3737
name: integration tests
3838
env:

.github/workflows/schedule.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
test:
99
strategy:
1010
matrix:
11-
platform: [ubuntu-20.04]
12-
go-version: [1.18.x]
11+
platform: [ubuntu-22.04]
12+
go-version: [1.19.x]
1313
runs-on: ${{ matrix.platform }}
1414
name: integration tests
1515
env:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This tool is meant to be used to download CC0 licenced content, we do not suppor
2222

2323
### Install via go get
2424

25-
Please ensure you have installed Go 1.17 or later.
25+
Please ensure you have installed Go 1.18 or later.
2626

2727
```shell
2828
go get github.com/kkdai/youtube/v2

cmd/youtubedr/root.go

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

33
import (
44
"fmt"
5-
"io/ioutil"
5+
"io"
66
"log"
77
"os"
88

@@ -33,7 +33,7 @@ func init() {
3333
cobra.OnInitialize(initConfig)
3434
cobra.OnInitialize(func() {
3535
if !verbose {
36-
log.SetOutput(ioutil.Discard)
36+
log.SetOutput(io.Discard)
3737
}
3838
})
3939

downloader/downloader.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"fmt"
66
"io"
7-
"io/ioutil"
87
"log"
98
"os"
109
"os/exec"
@@ -71,14 +70,14 @@ func (dl *Downloader) DownloadComposite(ctx context.Context, outputFile string,
7170
outputDir := filepath.Dir(destFile)
7271

7372
// Create temporary video file
74-
videoFile, err := ioutil.TempFile(outputDir, "youtube_*.m4v")
73+
videoFile, err := os.CreateTemp(outputDir, "youtube_*.m4v")
7574
if err != nil {
7675
return err
7776
}
7877
defer os.Remove(videoFile.Name())
7978

8079
// Create temporary audio file
81-
audioFile, err := ioutil.TempFile(outputDir, "youtube_*.m4a")
80+
audioFile, err := os.CreateTemp(outputDir, "youtube_*.m4a")
8281
if err != nil {
8382
return err
8483
}

go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
module github.com/kkdai/youtube/v2
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/bitly/go-simplejson v0.5.0
7-
github.com/dop251/goja v0.0.0-20220719153422-38a3647bcce0
7+
github.com/dop251/goja v0.0.0-20220915101355-d79e1b125a30
88
github.com/mitchellh/go-homedir v1.1.0
99
github.com/olekukonko/tablewriter v0.0.5
1010
github.com/spf13/cobra v1.5.0
1111
github.com/spf13/pflag v1.0.5
12-
github.com/spf13/viper v1.12.0
12+
github.com/spf13/viper v1.13.0
1313
github.com/stretchr/testify v1.8.0
1414
github.com/vbauerster/mpb/v5 v5.4.0
15-
golang.org/x/net v0.0.0-20220708220712-1185a9018129
15+
golang.org/x/net v0.0.0-20220919171627-f8f703f97925
1616
)
1717

1818
require (
@@ -24,22 +24,22 @@ require (
2424
github.com/fsnotify/fsnotify v1.5.4 // indirect
2525
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
2626
github.com/hashicorp/hcl v1.0.0 // indirect
27-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
27+
github.com/inconshreveable/mousetrap v1.0.1 // indirect
2828
github.com/magiconair/properties v1.8.6 // indirect
2929
github.com/mattn/go-runewidth v0.0.13 // indirect
3030
github.com/mitchellh/mapstructure v1.5.0 // indirect
3131
github.com/pelletier/go-toml v1.9.5 // indirect
32-
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
32+
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
3333
github.com/pmezard/go-difflib v1.0.0 // indirect
34-
github.com/rivo/uniseg v0.2.0 // indirect
35-
github.com/rogpeppe/go-internal v1.8.1 // indirect
34+
github.com/rivo/uniseg v0.4.2 // indirect
35+
github.com/rogpeppe/go-internal v1.9.0 // indirect
3636
github.com/spf13/afero v1.9.2 // indirect
3737
github.com/spf13/cast v1.5.0 // indirect
3838
github.com/spf13/jwalterweatherman v1.1.0 // indirect
39-
github.com/subosito/gotenv v1.4.0 // indirect
40-
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
39+
github.com/subosito/gotenv v1.4.1 // indirect
40+
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect
4141
golang.org/x/text v0.3.7 // indirect
42-
gopkg.in/ini.v1 v1.66.6 // indirect
42+
gopkg.in/ini.v1 v1.67.0 // indirect
4343
gopkg.in/yaml.v2 v2.4.0 // indirect
4444
gopkg.in/yaml.v3 v3.0.1 // indirect
4545
)

0 commit comments

Comments
 (0)