File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
5031func IsIPv6IP (s string ) bool {
5132 ip := net .ParseIP (s )
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments