MCPcopy Create free account
hub / github.com/DNAProject/DNA / checkType

Function checkType

cmd/account.go:190–205  ·  view source on GitHub ↗
(ctx *cli.Context, reader *bufio.Reader)

Source from the content-addressed store, hash-verified

188 }
189}
190func checkType(ctx *cli.Context, reader *bufio.Reader) string {
191 t := ""
192 typeFlag := utils.GetFlagName(utils.AccountTypeFlag)
193 if ctx.IsSet(typeFlag) {
194 if _, ok := keyTypeMap[ctx.String(typeFlag)]; ok {
195 t = keyTypeMap[ctx.String(typeFlag)].name
196 fmt.Printf("%s is selected. \n", t)
197 } else {
198 fmt.Printf("%s is not a valid content for option -t \n", ctx.String(typeFlag))
199 t = chooseKeyType(reader)
200 }
201 } else {
202 t = chooseKeyType(reader)
203 }
204 return t
205}
206func checkCurve(ctx *cli.Context, reader *bufio.Reader, t *string) string {
207 bitFlag := utils.GetFlagName(utils.AccountKeylenFlag)
208 c := ""

Callers 1

accountCreateFunction · 0.85

Calls 3

GetFlagNameFunction · 0.92
chooseKeyTypeFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected