Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertUnicodeToASCII ¶
ConvertUnicodeToASCII converts selected unicode characters to an ascii representation to support intended output. For instance, a byte stream may include a unicode representation of the ampersand symbol (`&`) or various formatting characters and in many cases ascii is the desired output with a common example being JSON.
func Flatten ¶
Flatten parses JSON data into a flattened string array of key/value pairs formatted with the provided formatter string. The path value determines which part of the object should be plucked for parsing. Flattened keys will consist of uppercase characters only with path elements separated by underscores.
For example: ```json
{ "environment": { "jwt_token": "006da898a814ff27e55900b8", "new_relic": { "app_name": "test-app", "enabled": "false", "license_key": "1a2fc8a8eeb33ad0bba6cc5c", "log_level": "info" }, } }
```
Given the path `environment` only its children `jwt_token`, `new_relic`, `app_name`, etc. will be inspected. An array of key/value strings returned will look like the following, if given the formatter `%s="%s"`:
```go [
`JWT_TOKEN="006da898a814ff27e55900b8"`, `NEW_RELIC_APP_NAME="processor-staging"`, `NEW_RELIC_ENABLED="false"`, `NEW_RELIC_LICENSE_KEY=""`, `NEW_RELIC_LOG_LEVEL="info"`, `SERVER_BASE_URL="https://institutional-api-staging.alphaflow.com/v1"`,
] ```
Types ¶
This section is empty.