• Kirill Smelkov's avatar
    exc: Contextf · 31661766
    Kirill Smelkov authored
    A shorthand for when exception context is just formatted string.
    Simplifies
    
    	func doSomething(path string) {
    		defer exc.Context(func() interface{} {
    			return fmt.Sprintf("doing something %s", path)
    		})()
    		...
    
    to
    
    	func doSomething(path string) {
    		defer exc.Contextf("doing something %s", path)
    		...
    31661766
error_test.go 4.63 KB