We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dfd4c5 commit 5f70ec6Copy full SHA for 5f70ec6
graph.go
@@ -210,10 +210,15 @@ func (d GraphData) String() string {
210
}
211
212
func (d GraphData) Int() int {
213
- if d.typ == graphInteger {
+ switch d.typ {
214
+ case graphInteger:
215
return int(d.integerVal)
216
+ case graphString:
217
+ n, _ := strconv.Atoi(d.stringVal)
218
+ return n
219
+ default:
220
+ return 0
221
- return 0
222
223
224
func (d GraphData) Bool() bool {
0 commit comments