Skip to content

Commit

Permalink
upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gonejack committed Dec 14, 2023
1 parent 7d275db commit 8800b21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/gonejack/transcode
go 1.21

require (
github.com/alecthomas/kong v0.8.0
github.com/alecthomas/kong v0.8.1
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
golang.org/x/text v0.12.0
golang.org/x/text v0.14.0
)
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2o
github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA=
github.com/alecthomas/kong v0.8.0 h1:ryDCzutfIqJPnNn0omnrgHLbAggDQM2VWHikE1xqK7s=
github.com/alecthomas/kong v0.8.0/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=
github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY=
github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=
github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE=
github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f h1:3BSP1Tbs2djlpprl7wCLuiqMaUh5SJkkzI2gDs+FgLs=
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
7 changes: 2 additions & 5 deletions transcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (c *trans) proc(f string) (err error) {
log.Printf("no changes, source file %s is already in target encoding %s", f, c.target)
return
}
out, err = os.CreateTemp(os.TempDir(), "")
out, err = os.CreateTemp(os.TempDir(), "transcode.*.txt")
if err != nil {
return
}
Expand All @@ -120,10 +120,7 @@ func (c *trans) proc(f string) (err error) {
os.Remove(out.Name())
}()
}
_, err = io.Copy(
transform.NewWriter(out, c.target.NewEncoder()),
transform.NewReader(srd, c.source.NewDecoder()),
)
_, err = io.Copy(transform.NewWriter(out, c.target.NewEncoder()), transform.NewReader(srd, c.source.NewDecoder()))
return
}

Expand Down

0 comments on commit 8800b21

Please sign in to comment.