Loading batch/batch.go +6 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ the first user.`) login, err := ask.GetLine("Enter login of initial user: ") login = strings.ToUpper(login) ask.CheckErr(err) ask.CheckErr(users.ValidLogin(login)) name, err := ask.GetLine("Enter name of initial user: ") ask.CheckErr(err) sshkey, err := ask.GetLine("Enter ssh public key of initial user: ") Loading Loading @@ -396,6 +397,11 @@ func MigrateKeysWithQueries(q *storage.Queries) error { skipped++ continue } if err := users.ValidLogin(login); err != nil { fmt.Printf("WARNING: skipping key for invalid login '%s': %s\n", login, err) skipped++ continue } // Ensure the user exists in the DB. u, err := q.GetUser(ctx, login) Loading go.mod +0 −4 Original line number Diff line number Diff line Loading @@ -55,19 +55,15 @@ require ( github.com/gookit/color v1.6.0 // indirect github.com/gordonklaus/ineffassign v0.2.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/pgx/v5 v5.7.5 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/lucasb-eyer/go-colorful v1.3.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.19 // indirect github.com/mibk/dupl v1.0.0 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect github.com/openai/openai-go/v3 v3.18.0 // indirect Loading go.sum +42 −162 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
batch/batch.go +6 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ the first user.`) login, err := ask.GetLine("Enter login of initial user: ") login = strings.ToUpper(login) ask.CheckErr(err) ask.CheckErr(users.ValidLogin(login)) name, err := ask.GetLine("Enter name of initial user: ") ask.CheckErr(err) sshkey, err := ask.GetLine("Enter ssh public key of initial user: ") Loading Loading @@ -396,6 +397,11 @@ func MigrateKeysWithQueries(q *storage.Queries) error { skipped++ continue } if err := users.ValidLogin(login); err != nil { fmt.Printf("WARNING: skipping key for invalid login '%s': %s\n", login, err) skipped++ continue } // Ensure the user exists in the DB. u, err := q.GetUser(ctx, login) Loading
go.mod +0 −4 Original line number Diff line number Diff line Loading @@ -55,19 +55,15 @@ require ( github.com/gookit/color v1.6.0 // indirect github.com/gordonklaus/ineffassign v0.2.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/pgx/v5 v5.7.5 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/lucasb-eyer/go-colorful v1.3.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.19 // indirect github.com/mibk/dupl v1.0.0 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect github.com/openai/openai-go/v3 v3.18.0 // indirect Loading