Skip to content

Instantly share code, notes, and snippets.

View aloftin's full-sized avatar

Adam Loftin aloftin

View GitHub Profile
@aloftin
aloftin / data-masking-struct-tag.go
Created November 16, 2021 13:33
This is a simplified example of how struct tags can be used to mask data.
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"reflect"
)
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "phi"
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {