Small go vet issues
This commit is contained in:
parent
1c343223b5
commit
79cce8e6c8
10
defaults.go
10
defaults.go
|
@ -223,18 +223,14 @@ func ReverseAddr(addr string) (arpa string, err error) {
|
|||
func (t Type) String() string {
|
||||
if t1, ok := TypeToString[uint16(t)]; ok {
|
||||
return t1
|
||||
} else {
|
||||
return "TYPE" + strconv.Itoa(int(t))
|
||||
}
|
||||
panic("dns: not reached") // go < 1.1 compat
|
||||
}
|
||||
return "TYPE" + strconv.Itoa(int(t))
|
||||
}
|
||||
|
||||
// String returns the string representation for the class c
|
||||
func (c Class) String() string {
|
||||
if c1, ok := ClassToString[uint16(c)]; ok {
|
||||
return c1
|
||||
} else {
|
||||
return "CLASS" + strconv.Itoa(int(c))
|
||||
}
|
||||
panic("dns: not reached")
|
||||
return "CLASS" + strconv.Itoa(int(c))
|
||||
}
|
||||
|
|
7
kscan.go
7
kscan.go
|
@ -161,9 +161,7 @@ func readPrivateKeyECDSA(m map[string]string) (PrivateKey, error) {
|
|||
}
|
||||
|
||||
func readPrivateKeyGOST(m map[string]string) (PrivateKey, error) {
|
||||
// p := new(ecdsa.PrivateKey)
|
||||
// p.D = big.NewInt(0)
|
||||
// Need to check if we have everything
|
||||
/* TODO(miek)
|
||||
for k, v := range m {
|
||||
switch k {
|
||||
case "gostasn1:":
|
||||
|
@ -174,9 +172,10 @@ func readPrivateKeyGOST(m map[string]string) (PrivateKey, error) {
|
|||
v1 = v1
|
||||
//p.D.SetBytes(v1)
|
||||
case "created:", "publish:", "activate:":
|
||||
/* not used in Go (yet) */
|
||||
// not used in Go (yet)
|
||||
}
|
||||
}
|
||||
*/
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -156,8 +156,6 @@ func modToPrintf(s string) (string, int, string) {
|
|||
return "", offset, "bad width in $GENERATE"
|
||||
case width == 0:
|
||||
return "%" + xs[1] + xs[2], offset, ""
|
||||
default:
|
||||
return "%0" + xs[1] + xs[2], offset, ""
|
||||
}
|
||||
panic("dns: not reached")
|
||||
return "%0" + xs[1] + xs[2], offset, ""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue