* Denis Cheremisov <denis.cheremi...@gmail.com> [191026 06:09]:
> The answer was simple: 
> 
> var fset token.FileSet – wrong
> 
> fset := token.NewFileSet() – right
I believe I am in the minority here, but I am not a singleton minority.
There are at least several of us who agree that «var» should be used
over «:=» whenever possible, and when you do use «:=», you should be
very careful, because it is frequently the cause of hidden shadowing
bugs.  This is especially true when declaring multiple variables.

I strongly encourage you to use

  var fset = token.NewFileSet()

rather than

  fset := token.NewFileSet()

...Marvin

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20191027025214.uqkd4rtu6gbrbt5b%40basil.wdw.

Reply via email to