Small confirmation to check if numbers can contain decimals

This commit is contained in:
Leon Mika 2022-06-03 15:39:12 +10:00
parent 0fb641cdfd
commit 4aac153edb
2 changed files with 2 additions and 7 deletions

View file

@ -51,12 +51,7 @@ func NewModel(rc *controllers.TableReadController, wc *controllers.TableWriteCon
// TEMP
"new-item": commandctrl.NoArgCommand(wc.NewItem()),
"set-string": func(args []string) tea.Cmd {
if len(args) != 1 {
return events.SetError(errors.New("expected attribute key"))
}
return wc.SetStringValue(dtv.SelectedItemIndex(), args[0])
},
"put": func(args []string) tea.Cmd {
return wc.PutItem(dtv.SelectedItemIndex())
},

View file

@ -77,7 +77,7 @@ func main() {
"inOffice": &types.AttributeValueMemberBOOL{Value: gofakeit.Bool()},
"ratings": &types.AttributeValueMemberL{Value: []types.AttributeValue{
&types.AttributeValueMemberS{Value: gofakeit.Adverb()},
&types.AttributeValueMemberN{Value: strconv.Itoa(int(gofakeit.Int32()))},
&types.AttributeValueMemberN{Value: "12.34"},
}},
"values": &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{
"adverb": &types.AttributeValueMemberS{Value: gofakeit.Adverb()},