replace deprecated dependency
The term part was moved to a separate library.
This commit is contained in:
parent
efa2f5b307
commit
b06f25281f
@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/lib/pq"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -72,7 +72,7 @@ func main() {
|
||||
switch flag.Arg(0) {
|
||||
case "pwgen":
|
||||
fmt.Printf("enter password: ")
|
||||
pw, err := terminal.ReadPassword(0)
|
||||
pw, err := term.ReadPassword(0)
|
||||
fmt.Println()
|
||||
if err != nil {
|
||||
log.Fatalf("could not read password: %s", err)
|
||||
@ -94,7 +94,7 @@ func main() {
|
||||
log.Fatalf("config '%s' is world readable!", *configPath)
|
||||
}
|
||||
|
||||
raw, err := ioutil.ReadFile(*configPath)
|
||||
raw, err := os.ReadFile(*configPath)
|
||||
if err != nil {
|
||||
log.Fatalf("could not read config: %s", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user