This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using the passed in pointer to an interface create a new instantiated structure (not an empty address) | |
func Update(foo interface{}) { | |
result := reflect.New(reflect.ValueOf(update).Elem().Type()).Interface() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package logger | |
// LoggedError is wrapper to differentiate logged panics from unexpected ones. | |
import ( | |
"os" | |
"fmt" | |
"strings" | |
"go.uber.org/zap" | |
"go.uber.org/zap/zapcore" |