github.com/Liam-Williams/i18n4go@v0.2.7-0.20201028180611-670cbaceaa6b/test_fixtures/extract_strings/f_option/input_files/issue45.go (about) 1 package app 2 3 import ( 4 "errors" 5 "fmt" 6 ) 7 8 func main() { 9 translatedString := "translated" 10 11 err := test() 12 if err != nil { 13 fmt.Println(err.Error()) 14 } 15 16 err = errors.New(T("This is another string which has been {{.Translated}}.", map[string]interface{}{"Translated": translatedString})) 17 if err != nil { 18 fmt.Println(err.Error()) 19 } 20 } 21 22 func test49() { 23 if true { 24 return errors.New(T("This is a string which has been {{.Translated}}.", map[string]interface{}{"Translated": translatedString})) 25 } 26 }