golint: trust

contributes to #14756

Signed-off-by: Sevki Hasirci <s@sevki.org>
This commit is contained in:
Sevki Hasirci 2015-07-28 21:18:04 +03:00 committed by Vincent Demeester
parent 409920de5c
commit 1c5cd03b1b
1 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ func TestIpOptString(t *testing.T) {
var ip net.IP var ip net.IP
for _, address := range addresses { for _, address := range addresses {
stringAddress := NewIpOpt(&ip, address).String() stringAddress := NewIPOpt(&ip, address).String()
if stringAddress != address { if stringAddress != address {
t.Fatalf("IpOpt string should be `%s`, not `%s`", address, stringAddress) t.Fatalf("IpOpt string should be `%s`, not `%s`", address, stringAddress)
} }
@ -21,7 +21,7 @@ func TestNewIpOptInvalidDefaultVal(t *testing.T) {
ip := net.IPv4(127, 0, 0, 1) ip := net.IPv4(127, 0, 0, 1)
defaultVal := "Not an ip" defaultVal := "Not an ip"
ipOpt := NewIpOpt(&ip, defaultVal) ipOpt := NewIPOpt(&ip, defaultVal)
expected := "127.0.0.1" expected := "127.0.0.1"
if ipOpt.String() != expected { if ipOpt.String() != expected {
@ -33,7 +33,7 @@ func TestNewIpOptValidDefaultVal(t *testing.T) {
ip := net.IPv4(127, 0, 0, 1) ip := net.IPv4(127, 0, 0, 1)
defaultVal := "192.168.1.1" defaultVal := "192.168.1.1"
ipOpt := NewIpOpt(&ip, defaultVal) ipOpt := NewIPOpt(&ip, defaultVal)
expected := "192.168.1.1" expected := "192.168.1.1"
if ipOpt.String() != expected { if ipOpt.String() != expected {
@ -43,7 +43,7 @@ func TestNewIpOptValidDefaultVal(t *testing.T) {
func TestIpOptSetInvalidVal(t *testing.T) { func TestIpOptSetInvalidVal(t *testing.T) {
ip := net.IPv4(127, 0, 0, 1) ip := net.IPv4(127, 0, 0, 1)
ipOpt := &IpOpt{IP: &ip} ipOpt := &IPOpt{IP: &ip}
invalidIP := "invalid ip" invalidIP := "invalid ip"
expectedError := "invalid ip is not an ip address" expectedError := "invalid ip is not an ip address"