persistedKey constructs a key in the form of type.value
(state S)
| 137 | |
| 138 | // persistedKey constructs a key in the form of type.value |
| 139 | func persistedKey[S WithState](state S) string { |
| 140 | key := state.Key() |
| 141 | |
| 142 | return fmt.Sprintf("%T.%v", key, key) |
| 143 | } |
| 144 | |
| 145 | // SetupState initializes the given state S and stores it in Context under S.Key(), if invoked |
| 146 | // twice for the same S.Key() the state will be set to the existing value from Context. If the |