stub teller.Init

main
Bel LaPointe 2025-05-23 21:12:27 -06:00
parent c38e8529af
commit 5a3d5e5610
2 changed files with 20 additions and 1 deletions

20
src/bank/teller/init.go Normal file
View File

@ -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()
}

View File

@ -1 +0,0 @@