Small confirmation to check if numbers can contain decimals
This commit is contained in:
parent
0fb641cdfd
commit
4aac153edb
|
@ -51,12 +51,7 @@ func NewModel(rc *controllers.TableReadController, wc *controllers.TableWriteCon
|
||||||
|
|
||||||
// TEMP
|
// TEMP
|
||||||
"new-item": commandctrl.NoArgCommand(wc.NewItem()),
|
"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 {
|
"put": func(args []string) tea.Cmd {
|
||||||
return wc.PutItem(dtv.SelectedItemIndex())
|
return wc.PutItem(dtv.SelectedItemIndex())
|
||||||
},
|
},
|
||||||
|
|
|
@ -77,7 +77,7 @@ func main() {
|
||||||
"inOffice": &types.AttributeValueMemberBOOL{Value: gofakeit.Bool()},
|
"inOffice": &types.AttributeValueMemberBOOL{Value: gofakeit.Bool()},
|
||||||
"ratings": &types.AttributeValueMemberL{Value: []types.AttributeValue{
|
"ratings": &types.AttributeValueMemberL{Value: []types.AttributeValue{
|
||||||
&types.AttributeValueMemberS{Value: gofakeit.Adverb()},
|
&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{
|
"values": &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{
|
||||||
"adverb": &types.AttributeValueMemberS{Value: gofakeit.Adverb()},
|
"adverb": &types.AttributeValueMemberS{Value: gofakeit.Adverb()},
|
||||||
|
|
Loading…
Reference in a new issue