Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKeys ¶
GetKeys returns a slice containing all the keys from the provided map.
Parameters ¶
- m (map[string]string): The input map from which to extract keys.
Return Values ¶
- []string: A slice of strings representing the keys in the map.
Expected behaviour ¶
- Iterates over each key in the map and appends it to a new slice.
- Returns the slice containing all the keys.
func SingleJoiningSlash ¶
SingleJoiningSlash joins two strings with a single slash between them, ensuring that the resulting path doesn't contain multiple consecutive slashes.
Parameters ¶
- a (string): The first string to join.
- b (string): The second string to join.
Return Values ¶
- result (string): The joined string with a single slash between them if needed.
Expected behaviour ¶
- If both a and b start and end with a slash, the resulting string will have only one slash between them.
- If neither a nor b starts or ends with a slash, the strings will be joined with a single slash in between.
- Otherwise, the two strings are simply concatenated.
Types ¶
This section is empty.