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:
parent
01b7bf0bfc
commit
30701b30c3
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user