@@ -8,7 +8,7 @@ import "katenary/utils"
8
8
9
9
Utils package provides some utility functions used in katenary. It defines some constants and functions used in the whole project.
10
10
11
- ## func [ Confirm] ( < https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L173 > )
11
+ ## func [ Confirm] ( < https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L174 > )
12
12
13
13
``` go
14
14
func Confirm (question string , icon ...Icon ) bool
@@ -26,14 +26,23 @@ func CountStartingSpaces(line string) int
26
26
CountStartingSpaces counts the number of spaces at the beginning of a string.
27
27
28
28
<a name="EncodeBasicYaml"></a>
29
- ## func [EncodeBasicYaml](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L185 >)
29
+ ## func [EncodeBasicYaml](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L186 >)
30
30
31
31
```go
32
32
func EncodeBasicYaml(data any) ([]byte, error)
33
33
```
34
34
35
35
EncodeBasicYaml encodes a basic yaml from an interface.
36
36
37
+ <a name="FixedResourceName"></a>
38
+ ## func [FixedResourceName](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L198>)
39
+
40
+ ```go
41
+ func FixedResourceName(name string) string
42
+ ```
43
+
44
+ FixedResourceName returns a resource name without underscores to respect the kubernetes naming convention.
45
+
37
46
<a name="GetContainerByName"></a>
38
47
## func [GetContainerByName](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L89>)
39
48
@@ -62,7 +71,7 @@ func GetServiceNameByPort(port int) string
62
71
GetServiceNameByPort returns the service name for a port. It the service name is not found, it returns an empty string.
63
72
64
73
<a name="GetValuesFromLabel"></a>
65
- ## func [GetValuesFromLabel](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L130 >)
74
+ ## func [GetValuesFromLabel](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L131 >)
66
75
67
76
```go
68
77
func GetValuesFromLabel(service types.ServiceConfig, LabelValues string) map[string]*EnvConfig
@@ -89,7 +98,7 @@ func Int32Ptr(i int32) *int32
89
98
Int32Ptr returns a pointer to an int32.
90
99
91
100
<a name="MapKeys"></a>
92
- ## func [MapKeys](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L164 >)
101
+ ## func [MapKeys](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L165 >)
93
102
94
103
```go
95
104
func MapKeys(m map[string]interface{}) []string
@@ -143,7 +152,7 @@ func Warn(msg ...interface{})
143
152
Warn prints a warning message
144
153
145
154
<a name =" WordWrap " ></a >
146
- ## func [ WordWrap] ( < https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L160 > )
155
+ ## func [ WordWrap] ( < https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L161 > )
147
156
148
157
``` go
149
158
func WordWrap (text string , lineWidth int ) string
@@ -170,7 +179,7 @@ func WrapBytes(src, above, below []byte) []byte
170
179
WrapBytes wraps a byte array with a byte array above and below. It will respect the indentation of the src string.
171
180
172
181
<a name="EnvConfig"></a>
173
- ## type [EnvConfig](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L124-L127 >)
182
+ ## type [EnvConfig](<https:// github.com/metal3d/katenary/blob/develop/utils/utils.go#L125-L128 >)
174
183
175
184
EnvConfig is a struct to hold the description of an environment variable.
176
185
0 commit comments