Skip to content

Commit

Permalink
use golang.org/x/term
Browse files Browse the repository at this point in the history
  • Loading branch information
goccy committed Oct 17, 2024
1 parent ab76bce commit 0d29d9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/dot/dot.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/goccy/go-graphviz"
"github.com/jessevdk/go-flags"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
)

type Option struct {
Expand All @@ -20,7 +20,7 @@ type Option struct {

func readGraph(args []string) (*graphviz.Graph, error) {
if len(args) == 0 {
if terminal.IsTerminal(0) {
if term.IsTerminal(0) {
return nil, errors.New("required dot file or stdin")
}
bytes, err := io.ReadAll(os.Stdin)
Expand Down
3 changes: 1 addition & 2 deletions cmd/dot/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace github.com/goccy/go-graphviz => ../../
require (
github.com/goccy/go-graphviz v0.0.0-00010101000000-000000000000
github.com/jessevdk/go-flags v1.6.1
golang.org/x/crypto v0.28.0
golang.org/x/term v0.25.0
)

require (
Expand All @@ -16,5 +16,4 @@ require (
github.com/tetratelabs/wazero v1.8.1 // indirect
golang.org/x/image v0.21.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
)
2 changes: 0 additions & 2 deletions cmd/dot/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550=
github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
Expand Down

0 comments on commit 0d29d9f

Please sign in to comment.