func zapField(f *gen.Field, ident string) (string, error) {
	switch {
	case f.IsString():
		return fmt.Sprintf(`zap.String("%s", %s)`, f.Name, f.BasicType(ident)), nil
	case f.IsUUID(), f.Type.Stringer():
		return fmt.Sprintf(`zap.String("%s", %s.String())`, f.Name, ident), nil
	case f.Type.Numeric():
		return fmt.Sprintf(`zap.%s("%s", %s)`, strings.Title(f.Type.String()), f.Name, ident), nil
	}
	return "", fmt.Errorf("elk: invalid ID-Type %q", f.Type.String())
}
// zapField returns an expression to log the given field to zap.
zapField returns an expression to log the given field to zap.
// zapField returns an expression to log the given field to zap .
func zapField(f *gen.Field, ident string) (string, error) {
	switch {
	case f.IsString():
		return fmt.Sprintf(`zap.String("%s", %s)`, f.Name, f.BasicType(ident)), nil
	case f.IsUUID(), f.Type.Stringer():
		return fmt.Sprintf(`zap.String("%s", %s.String())`, f.Name, ident), nil
	case f.Type.Numeric():
		return fmt.Sprintf(`zap.%s("%s", %s)`, strings.Title(f.Type.String()), f.Name, ident), nil
	}
	return "", fmt.Errorf("elk: invalid ID-Type %q", f.Type.String())
}
func zapField ( f * gen . Field , ident string ) ( string , error ) { switch { case f . IsString ( ) : return fmt . Sprintf ( `zap.String("%s", %s)` , f . Name , f . BasicType ( ident ) ) , nil case f . IsUUID ( ) , f . Type . Stringer ( ) : return fmt . Sprintf ( `zap.String("%s", %s.String())` , f . Name , ident ) , nil case f . Type . Numeric ( ) : return fmt . Sprintf ( `zap.%s("%s", %s)` , strings . Title ( f . Type . String ( ) ) , f . Name , ident ) , nil } return " " , fmt . Errorf ( " " , f . Type . String ( ) ) }
zapField returns an expression to log the given field to zap.
zapField returns an expression to log the given field to zap .