stub teller.Init
parent
c38e8529af
commit
5a3d5e5610
|
|
@ -0,0 +1,20 @@
|
|||
package teller
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Init(ctx context.Context) error {
|
||||
if Token == "" {
|
||||
} else if reader := bufio.NewReader(os.Stdin); false {
|
||||
} else if fmt.Println("Token already exists; are you sure [nY]?"); false {
|
||||
} else if text, _ := reader.ReadString('\n'); !strings.Contains(text, "Y") {
|
||||
return fmt.Errorf("token already exists")
|
||||
}
|
||||
|
||||
return ctx.Err()
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
|
||||
Loading…
Reference in New Issue