1
0
mirror of https://github.com/rancher/types.git synced 2025-07-18 23:36:24 +00:00

Refactor for IsEmpty

This commit is contained in:
Darren Shepherd 2018-07-13 13:26:30 -07:00
parent 01b7bf0bfc
commit 30701b30c3
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ func (e ServiceSpecMapper) ToInternal(data map[string]interface{}) error {
return nil
}
if convert.IsEmpty(data["hostname"]) {
if convert.IsAPIObjectEmpty(data["hostname"]) {
data["type"] = "ClusterIP"
data["clusterIP"] = "None"
} else {

View File

@ -11,7 +11,7 @@ type ContainerProbeHandler struct {
func (n ContainerProbeHandler) FromInternal(data map[string]interface{}) {
value := values.GetValueN(data, "tcpSocket", "port")
if !convert.IsEmpty(value) {
if !convert.IsAPIObjectEmpty(value) {
data["tcp"] = true
}
}