Thanks Florin. Your explanation makes a lot of sense. I'll also write tests
going forward so that all exported functions are "used" at least once.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving
Gogland does not use go vet.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.goog
There are chances that other function names will change the signature to match
interfaces in your GOPATH, in which case Gogland will not mark the function as
unused since it won't know if it's needed to implement that interface or not
(given how interfaces work in Go).
Since Gogland looks in y
Thanks. But why does ReadLine is reported as an unused function but not
when the function is renamed to Read?
On Saturday, August 26, 2017 at 4:36:59 PM UTC-4, Justin Israel wrote:
>
>
>
> On Sun, Aug 27, 2017, 7:43 AM zsoumya >
> wrote:
>
>> Golang noob here trying to create a basic standalone
On Sun, Aug 27, 2017, 7:43 AM zsoumya wrote:
> Golang noob here trying to create a basic standalone package.
>
> The package code is simple and is given below:
>
> package Utils
>
> import (
>"bufio"
>"os"
> )
>
> func ReadLine() string {
>scanner := bufio.NewScanner(os.Stdin)
>sc
Golang noob here trying to create a basic standalone package.
The package code is simple and is given below:
package Utils
import (
"bufio"
"os"
)
func ReadLine() string {
scanner := bufio.NewScanner(os.Stdin)
scanner.Scan()
return scanner.Text()
}
It works as expected but I ge