Class GolangUtil

java.lang.Object
uk.co.real_logic.sbe.generation.golang.GolangUtil

public class GolangUtil extends Object
Utilities for mapping between IR and the Golang language.
  • Constructor Details

    • GolangUtil

      public GolangUtil()
  • Method Details

    • golangTypeName

      public static String golangTypeName(PrimitiveType primitiveType)
      Map the name of a PrimitiveType to a Golang primitive type name.
      Parameters:
      primitiveType - to map.
      Returns:
      the name of the Java primitive that most closely maps.
    • golangMarshalType

      public static String golangMarshalType(PrimitiveType primitiveType)
      Map the name of a PrimitiveType to a Golang marhsalling function name.
      Parameters:
      primitiveType - to map.
      Returns:
      the name of the Java primitive that most closely maps.
    • formatPropertyName

      public static String formatPropertyName(String value)
      Format a String as a property name.
      Parameters:
      value - to be formatted.
      Returns:
      the string formatted as a property name.
    • formatTypeName

      public static String formatTypeName(String value)
      Format a String as a type name.
      Parameters:
      value - to be formatted.
      Returns:
      the string formatted as an exported type name.