MetaKey formats a metadata key with the standard prefix.
(key string)
| 29 | |
| 30 | // MetaKey formats a metadata key with the standard prefix. |
| 31 | func MetaKey(key string) string { |
| 32 | return MetaPrefix + strings.ToLower(strings.ReplaceAll(key, " ", "_")) |
| 33 | } |
| 34 | |
| 35 | // MetaURLOrigin extracts the origin (scheme + host) from a URL for metadata purposes. |
| 36 | func MetaURLOrigin(fullURL string) string { |