Compare commits

...

2 Commits

Author SHA1 Message Date
vilmibm 3638685d24 add note 2023-03-15 08:16:16 +00:00
vilmibm cb0d574a76 ok 2023-03-15 08:13:44 +00:00
1 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,9 @@ import (
"github.com/AlecAivazis/survey/v2" "github.com/AlecAivazis/survey/v2"
) )
// TODO ok so right now this just does one hyper specific thing, but I want to
// add more similar scripts here. this might warrant the introduction of cobra.
func confirmContinue(msg string) { func confirmContinue(msg string) {
var serr error var serr error
var conf bool var conf bool
@ -52,6 +55,10 @@ func main() {
errs := []error{} errs := []error{}
signups := make([]jsonSignup, len(lines)) signups := make([]jsonSignup, len(lines))
for i, l := range lines { for i, l := range lines {
l = strings.TrimSpace(l)
if l == "" {
continue
}
s := jsonSignup{} s := jsonSignup{}
err := json.Unmarshal([]byte(l), &s) err := json.Unmarshal([]byte(l), &s)
if err != nil { if err != nil {