github.com/kyma-project/kyma-environment-broker@v0.0.1/internal/broker/utils.go (about) 1 package broker 2 3 import ( 4 "encoding/json" 5 ) 6 7 func Marshal(obj interface{}) []byte { 8 if obj == nil { 9 return []byte{} 10 } 11 bytes, err := json.Marshal(obj) 12 if err != nil { 13 panic(err) 14 } 15 return bytes 16 }