chore(refacto): use utils package
This commit is contained in:
@@ -2,6 +2,7 @@ package labelStructs
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"katenary/utils"
|
||||||
|
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
@@ -22,14 +23,11 @@ type Ingress struct {
|
|||||||
|
|
||||||
// IngressFrom creates a new Ingress from a compose service.
|
// IngressFrom creates a new Ingress from a compose service.
|
||||||
func IngressFrom(data string) (*Ingress, error) {
|
func IngressFrom(data string) (*Ingress, error) {
|
||||||
strPtr := func(s string) *string {
|
|
||||||
return &s
|
|
||||||
}
|
|
||||||
mapping := Ingress{
|
mapping := Ingress{
|
||||||
Hostname: "",
|
Hostname: "",
|
||||||
Path: strPtr("/"),
|
Path: utils.StrPtr("/"),
|
||||||
Enabled: false,
|
Enabled: false,
|
||||||
Class: strPtr("-"),
|
Class: utils.StrPtr("-"),
|
||||||
Port: nil,
|
Port: nil,
|
||||||
TLS: &TLS{Enabled: true},
|
TLS: &TLS{Enabled: true},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user