fielddefault

package
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultValue

func DefaultValue(fld protoreflect.FieldDescriptor) string

DefaultValue returns the string representation of the default value for the given field. If it has no default, this returns the empty string. The string representation is the same as stored in the default_value field of a google.protobuf.FieldDescriptorProto message.

func FormatFloat

func FormatFloat(flt float64, bitSize int) string

FormatFloat returns the string representation of the given floating point value, as used in default values and in option values in proto source. The bitSize is 32 for float values and 64 for double values.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL