public class Golang extends ObjectHelper methods that have to do with certain golang-specific format the server uses.
Constructors Constructor Description
All Methods Static Methods Concrete Methods Modifier and Type Method Description
encodeDurationToMs(Duration duration)Encodes a Java duration into the encoded golang format.
parseDuration(String duration)Parses a Go duration string using the same rules as Go's time.ParseDuration method.
encodeDurationToMsEncodes a Java duration into the encoded golang format.
duration- the duration to encode.
- the encoded duration.
parseDurationParses a Go duration string using the same rules as Go's time.ParseDuration method.
A Go duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". The unit suffix may be omitted if the duration is "0".
The internal representation is a signed long number of nanoseconds. This means the longest possible duration is approximately 290 years.
InvalidArgumentException- if the input does not match the Go duration string syntax or if it describes a duration longer than 2^63−1 nanoseconds.