summaryrefslogtreecommitdiff
path: root/vendor/github.com/containernetworking/cni/pkg/types
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/containernetworking/cni/pkg/types')
-rw-r--r--vendor/github.com/containernetworking/cni/pkg/types/020/types.go14
-rw-r--r--vendor/github.com/containernetworking/cni/pkg/types/current/types.go17
-rw-r--r--vendor/github.com/containernetworking/cni/pkg/types/types.go3
3 files changed, 0 insertions, 34 deletions
diff --git a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go
index 53256167f..36f31678a 100644
--- a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go
+++ b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go
@@ -86,20 +86,6 @@ func (r *Result) PrintTo(writer io.Writer) error {
return err
}
-// String returns a formatted string in the form of "[IP4: $1,][ IP6: $2,] DNS: $3" where
-// $1 represents the receiver's IPv4, $2 represents the receiver's IPv6 and $3 the
-// receiver's DNS. If $1 or $2 are nil, they won't be present in the returned string.
-func (r *Result) String() string {
- var str string
- if r.IP4 != nil {
- str = fmt.Sprintf("IP4:%+v, ", *r.IP4)
- }
- if r.IP6 != nil {
- str += fmt.Sprintf("IP6:%+v, ", *r.IP6)
- }
- return fmt.Sprintf("%sDNS:%+v", str, r.DNS)
-}
-
// IPConfig contains values necessary to configure an interface
type IPConfig struct {
IP net.IPNet
diff --git a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go
index 7267a2e6d..754cc6e72 100644
--- a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go
+++ b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go
@@ -207,23 +207,6 @@ func (r *Result) PrintTo(writer io.Writer) error {
return err
}
-// String returns a formatted string in the form of "[Interfaces: $1,][ IP: $2,] DNS: $3" where
-// $1 represents the receiver's Interfaces, $2 represents the receiver's IP addresses and $3 the
-// receiver's DNS. If $1 or $2 are nil, they won't be present in the returned string.
-func (r *Result) String() string {
- var str string
- if len(r.Interfaces) > 0 {
- str += fmt.Sprintf("Interfaces:%+v, ", r.Interfaces)
- }
- if len(r.IPs) > 0 {
- str += fmt.Sprintf("IP:%+v, ", r.IPs)
- }
- if len(r.Routes) > 0 {
- str += fmt.Sprintf("Routes:%+v, ", r.Routes)
- }
- return fmt.Sprintf("%sDNS:%+v", str, r.DNS)
-}
-
// Convert this old version result to the current CNI version result
func (r *Result) Convert() (*Result, error) {
return r, nil
diff --git a/vendor/github.com/containernetworking/cni/pkg/types/types.go b/vendor/github.com/containernetworking/cni/pkg/types/types.go
index 3e185c1ce..3fa757a5d 100644
--- a/vendor/github.com/containernetworking/cni/pkg/types/types.go
+++ b/vendor/github.com/containernetworking/cni/pkg/types/types.go
@@ -100,9 +100,6 @@ type Result interface {
// Prints the result in JSON format to provided writer
PrintTo(writer io.Writer) error
-
- // Returns a JSON string representation of the result
- String() string
}
func PrintResult(result Result, version string) error {