func loadAsset(assetName string) { assetBytes, err := resources.Asset(assetName) if err != nil { panic(fmt.Sprintf("Could not load asset '%s': %s", assetName, err.Error())) } err = go_i18n.ParseTranslationFileBytes(assetName, assetBytes) if err != nil { panic(fmt.Sprintf("Could not load translations '%s': %s", assetName, err.Error())) } }
func loadAsset(assetName string) error { assetBytes, err := resources.Asset(assetName) if err != nil { return fmt.Errorf("Could not load asset '%s': %s", assetName, err.Error()) } err = i18n.ParseTranslationFileBytes(assetName, assetBytes) if err != nil { return fmt.Errorf("Could not load translations '%s': %s", assetName, err.Error()) } return nil }