config: path, load, save // PropToHeader converts a property full name to an HTTP header tag name
(prop string)
| 55 | |
| 56 | // PropToHeader converts a property full name to an HTTP header tag name |
| 57 | func PropToHeader(prop string) string { |
| 58 | if strings.HasPrefix(prop, apc.HeaderPrefix) { |
| 59 | return prop |
| 60 | } |
| 61 | if prop[0] == '.' || prop[0] == '_' { |
| 62 | prop = prop[1:] |
| 63 | } |
| 64 | prop = strings.ReplaceAll(prop, ".", "-") |
| 65 | prop = strings.ReplaceAll(prop, "_", "-") |
| 66 | return apc.HeaderPrefix + prop |
| 67 | } |
| 68 | |
| 69 | // promoted destination object's name |
| 70 | func PromotedObjDstName(objfqn, dirfqn, givenObjName string) (objName string, err error) { |
no outgoing calls
no test coverage detected