Makefile: add vet target
Makefile: add vet target

Add a vet target in order to catch suspicious constructs
reported by go vet.

Vet has successfully detected problems in the past,
for example, see

  c9333b1b9b472feb5cad80e2c8276d41b64bde88

Some vet flags are noisy. In particular, the following flags
reports a large amount of generally unharmful constructs:

```
  -assign: check for useless assignments
  -composites: check that composite literals used field-keyed
               elements
  -shadow: check for shadowed variables
  -shadowstrict: whether to be strict about shadowing
  -unreachable: check for unreachable code
```

In order to skip running the flags mentioned above, vet is
invoked on a directory basis with `go tool vet .` since package-
level type-checking with `go vet` doesn't accept flags.

Hence, each file is vetted in isolation, which is weaker than
package-level type-checking. But nevertheless, it might catch
suspicious constructs that pose a real issue.

The vet target runs the following flags on the entire repo:

```
  -asmdecl: check assembly against Go declarations
  -atomic: check for common mistaken usages of the
           sync/atomic package
  -bool: check for mistakes involving boolean operators
  -buildtags: check that +build tags are valid
  -copylocks: check that locks are not passed by value
  -methods: check that canonically named methods are canonically
            defined
  -nilfunc: check for comparisons between functions and nil
  -printf: check printf-like invocations
  -rangeloops: check that range loop variables are used correctly
  -shift: check for useless shifts
  -structtags: check that struct field tags have canonical format
               and apply to exported fields as needed
  -unsafeptr: check for misuse of unsafe.Pointer
```

Now and then, it might make sense to check the output of the
disabled flags manually.
For example, `VETARGS=-unreachable make vet` can detect several
lines of dead code that can be deleted, etc.

owlin/consul,kikitux/consul,elemet/consul,Eagle-X/consul,JioCloud/consul,leowmjw/consul,tamsky/consul,pmalmgren/consul,krmcbride/consul,dustinbrown/consul,marouenj/consul,keyang512/consul,DivyaVavili/consul,pdf/consul,pdf/consul,kaskavalci/consul,EasonYi/consul,samaitra/consul,dustinbrown/consul,beni55/consul,msn217/consul,half-dead/consul,half-dead/consul,curtiszimmerman/consul,calgaryscientific/consul,guojianli/consul,marenzo/consul,Thib17/consul,ekristen/consul,tomdionysus/consul,tugbabodrumlu/consul,jeffawang/consul,Spantree/consul,samaitra/consul,mckennajones/consul,scalp42/consul,elcuervo/consul,DivyaVavili/consul,ekristen/consul,Spantree/consul,JioCloud/consul,ffung/consul,macb/consul,kylemcc/consul,linearregression/consul,samaitra/consul,StefanScherer/consul,yonglehou/consul,kingland/consul,scalp42/consul,invenfantasy/consul,andygoalkeeper/consul,yonglehou/consul,JioCloud/consul,nvoron23/consul,dankraw/consul,i0rek/consul,wuub/consul,jeffawang/consul,krmcbride/consul,kingland/consul,Pivotal-Pierre-Delagrave/consul,sean-/consul,sequenceiq/consul,half-dead/consul,kylemcc/consul,sfncook/consul,itnihao/consul,talwai/consul,itnihao/consul,kaskavalci/consul,42wim/consul,pmalmgren/consul,keyang512/consul,AlphaStaxLLC/consul,BWITS/consul,kaskavalci/consul,msn217/consul,Eagle-X/consul,vamage/consul,zendesk/consul,Thib17/consul,owlin/consul,sweeneyb/consul,wuub/consul,jovandeginste/consul,pmalmgren/consul,hashicorp/consul,Pivotal-Pierre-Delagrave/consul,curtiszimmerman/consul,marenzo/consul,faiq/consul,webhost/consul,Spantree/consul,andygoalkeeper/consul,youhong316/consul,half-dead/consul,anshprat/consul,sean-/consul,turbine/consul,bodepd/consul,elcuervo/consul,tugbabodrumlu/consul,sfncook/consul,turbine/consul,rhyas/consul,marenzo/consul,marouenj/consul,mshean/consul,BWITS/consul,kylemcc/consul,owlin/consul,wuub/consul,kikitux/consul,marclop/consul,sunadm/consul,tshak/consul,sfncook/consul,guojianli/consul,shaneog/consul,Eagle-X/consul,sequenceiq/consul,msn217/consul,nvoron23/consul,ryotarai/consul,tamsky/consul,sfncook/consul,sroegner/consul,ryotarai/consul,lindenlab/consul,zeroae/consul,mfischer-zd/consul,zendesk/consul,msn217/consul,mshean/consul,anshprat/consul,tshak/consul,Spantree/consul,AlphaStaxLLC/consul,i0rek/consul,kaskavalci/consul,sean-/consul,tempbottle/consul,shaneog/consul,sroegner/consul,shaneog/consul,yonglehou/consul,vamage/consul,42wim/consul,mfischer-zd/consul,elemet/consul,mfischer-zd/consul,lindenlab/consul,linearregression/consul,jeffawang/consul,macb/consul,yonglehou/consul,vamage/consul,elcuervo/consul,marclop/consul,Test-Betta-Inc/upgraded-engine,i0rek/consul,soundcloud/consul,calgaryscientific/consul,jovandeginste/consul,JioCloud/consul,alouche/consul,StefanScherer/consul,ekristen/consul,vamage/consul,bodepd/consul,dustinbrown/consul,42wim/consul,mfischer-zd/consul,scalp42/consul,ryotarai/consul,anshprat/consul,itnihao/consul,youhong316/consul,42wim/consul,sunadm/consul,Test-Betta-Inc/upgraded-engine,curtiszimmerman/consul,mbrukman/consul,tugbabodrumlu/consul,yonglehou/consul,turbine/consul,marouenj/consul,soundcloud/consul,dustinbrown/consul,marouenj/consul,mbrukman/consul,zendesk/consul,i0rek/consul,Spantree/consul,marenzo/consul,invenfantasy/consul,turbine/consul,rhyas/consul,talwai/consul,mckennajones/consul,faiq/consul,tomdionysus/consul,kikitux/consul,sroegner/consul,jeffawang/consul,mbrukman/consul,sean-/consul,Thib17/consul,alouche/consul,EasonYi/consul,guojianli/consul,EasonYi/consul,kikitux/consul,tugbabodrumlu/consul,tomdionysus/consul,elemet/consul,nicholascapo/consul,wuub/consul,elcuervo/consul,rhyas/consul,zeroae/consul,tugbabodrumlu/consul,sweeneyb/consul,webhost/consul,sunadm/consul,anshprat/consul,soundcloud/consul,Eagle-X/consul,macb/consul,mckennajones/consul,andygoalkeeper/consul,leowmjw/consul,turbine/consul,macb/consul,wuub/consul,BWITS/consul,leowmjw/consul,sequenceiq/consul,EasonYi/consul,samaitra/consul,marenzo/consul,lindenlab/consul,marclop/consul,webhost/consul,invenfantasy/consul,Eagle-X/consul,kaskavalci/consul,keyang512/consul,pdf/consul,itnihao/consul,sequenceiq/consul,kingland/consul,Test-Betta-Inc/upgraded-engine,webhost/consul,StefanScherer/consul,mckennajones/consul,guojianli/consul,sweeneyb/consul,DivyaVavili/consul,kingland/consul,soundcloud/consul,leowmjw/consul,mckennajones/consul,i0rek/consul,linearregression/consul,invenfantasy/consul,tomdionysus/consul,Test-Betta-Inc/upgraded-engine,AlphaStaxLLC/consul,lindenlab/consul,ryotarai/consul,tshak/consul,itnihao/consul,StefanScherer/consul,linearregression/consul,tempbottle/consul,hashicorp/consul,pmalmgren/consul,JioCloud/consul,ffung/consul,talwai/consul,ffung/consul,tempbottle/consul,beni55/consul,pdf/consul,mfischer-zd/consul,42wim/consul,anshprat/consul,ffung/consul,pdf/consul,sroegner/consul,AlphaStaxLLC/consul,AlphaStaxLLC/consul,vamage/consul,elemet/consul,sweeneyb/consul,bodepd/consul,rhyas/consul,pmalmgren/consul,ffung/consul,tempbottle/consul,tshak/consul,sequenceiq/consul,sfncook/consul,macb/consul,youhong316/consul,faiq/consul,beni55/consul,StefanScherer/consul,bodepd/consul,tshak/consul,nvoron23/consul,mshean/consul,jeffawang/consul,mbrukman/consul,Pivotal-Pierre-Delagrave/consul,andygoalkeeper/consul,curtiszimmerman/consul,hashicorp/consul,elcuervo/consul,zeroae/consul,BWITS/consul,krmcbride/consul,msn217/consul,zeroae/consul,jovandeginste/consul,beni55/consul,sean-/consul,nicholascapo/consul,krmcbride/consul,mshean/consul,hashicorp/consul,owlin/consul,linearregression/consul,nicholascapo/consul,Thib17/consul,calgaryscientific/consul,rhyas/consul,tamsky/consul,sunadm/consul,youhong316/consul,tempbottle/consul,nvoron23/consul,dankraw/consul,marclop/consul,zendesk/consul,jovandeginste/consul,kikitux/consul,marclop/consul,kylemcc/consul,alouche/consul,marouenj/consul,DivyaVavili/consul,sunadm/consul,dankraw/consul,kingland/consul,krmcbride/consul,talwai/consul,Thib17/consul,keyang512/consul,owlin/consul,EasonYi/consul,ekristen/consul,faiq/consul,nvoron23/consul,dankraw/consul,mshean/consul,scalp42/consul,keyang512/consul,alouche/consul,curtiszimmerman/consul,sroegner/consul,invenfantasy/consul,ekristen/consul,mfischer-zd/consul,jovandeginste/consul,alouche/consul,bodepd/consul,dustinbrown/consul,beni55/consul,guojianli/consul,shaneog/consul,elemet/consul,zendesk/consul,DivyaVavili/consul,kylemcc/consul,dankraw/consul,calgaryscientific/consul,youhong316/consul,BWITS/consul,scalp42/consul,Pivotal-Pierre-Delagrave/consul,lindenlab/consul,nvoron23/consul,Pivotal-Pierre-Delagrave/consul,leowmjw/consul,shaneog/consul,nicholascapo/consul,andygoalkeeper/consul,nicholascapo/consul,tamsky/consul,calgaryscientific/consul,soundcloud/consul,mbrukman/consul,Test-Betta-Inc/upgraded-engine,sweeneyb/consul,tomdionysus/consul,half-dead/consul,talwai/consul,webhost/consul,faiq/consul,zeroae/consul,tamsky/consul,ryotarai/consul,samaitra/consul