My program can not get a value of “floatvalue” from scan function.
I am pretty sure that my code is coorect but for some reason it doesn’t execute right
Am i doing smth wrong?
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Visual Studio Code
Version: 1.48.1 (user setup)
Commit: 3dd905126b34dcd4de81fa624eb3a8cbe7485f13
Date: 2020-08-19T17:12:13.244Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362
Name: Go
Id: golang.go
Description: Rich Go language support for Visual Studio Code
The first is the number of items it successfully parsed, the second is an error value.
If the first value is less than the number of arguments you passed to fmt.Scan then something went wrong and the other return value will be non-nil. In practice most just check the error value instead of the number of parsed arguments, but print/log the number for debugging purposes.