Skip to content

Commit 5ae94fa

Browse files
committed
Delete more dead code
1 parent 05af406 commit 5ae94fa

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

upup/pkg/fi/utils/net.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,6 @@ import (
2727
"github.com/apparentlymart/go-cidr/cidr"
2828
)
2929

30-
// IsIPv4IP checks if a string is a valid IPv4 IP.
31-
func IsIPv4IP(s string) bool {
32-
ip := net.ParseIP(s)
33-
if ip == nil {
34-
return false
35-
}
36-
37-
// Must convert to IPv4
38-
if ip.To4() == nil {
39-
return false
40-
}
41-
// Must NOT contain ":"
42-
if strings.Contains(s, ":") {
43-
return false
44-
}
45-
46-
return true
47-
}
48-
4930
// IsIPv6IP checks if a string is a valid IPv6 IP.
5031
func IsIPv6IP(s string) bool {
5132
ip := net.ParseIP(s)

upup/pkg/fi/utils/yaml.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ import (
2222

2323
// See http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/
2424

25-
// YAMLToJSON converts yaml to json
26-
func YAMLToJSON(yamlBytes []byte) ([]byte, error) {
27-
return yaml.YAMLToJSON(yamlBytes)
28-
}
29-
3025
// YamlUnmarshal unmarshals the yaml content to an interface
3126
// Note: if you are loading a kops.k8s.io API object,
3227
// normally you want something like kopscodecs.Decode,

0 commit comments

Comments
 (0)