🌟 add support of workspace networkpolicy

This commit is contained in:
magicsong
2019-07-23 11:26:41 +08:00
parent a61f9a52b8
commit 75d787f15f
42 changed files with 2867 additions and 31 deletions

View File

@@ -0,0 +1,12 @@
package testing
import (
"strings"
"k8s.io/apimachinery/pkg/util/yaml"
)
func StringToObject(data string, obj interface{}) error {
reader := strings.NewReader(data)
return yaml.NewYAMLOrJSONDecoder(reader, 10).Decode(obj)
}