Enum GoArch

  • All Implemented Interfaces:
    Serializable, Comparable<GoArch>

    public enum GoArch
    extends Enum<GoArch>
    Represents the GOARCH values in Go found at: https://github.com/golang/go/blob/master/src/go/build/syslist.go
    • Enum Constant Detail

      • I386

        public static final GoArch I386
      • AMD64

        public static final GoArch AMD64
      • AMD64P32

        public static final GoArch AMD64P32
      • ARM

        public static final GoArch ARM
      • ARMV5

        public static final GoArch ARMV5
      • ARMv6

        public static final GoArch ARMv6
      • ARMV7

        public static final GoArch ARMV7
      • ARMBE

        public static final GoArch ARMBE
      • ARM64

        public static final GoArch ARM64
      • ARM64BE

        public static final GoArch ARM64BE
      • PPC64

        public static final GoArch PPC64
      • PPC64LE

        public static final GoArch PPC64LE
      • MIPS

        public static final GoArch MIPS
      • MIPSLE

        public static final GoArch MIPSLE
      • MIPS64

        public static final GoArch MIPS64
      • MIPS64LE

        public static final GoArch MIPS64LE
      • MIPS64P32

        public static final GoArch MIPS64P32
      • MIPS64P32LE

        public static final GoArch MIPS64P32LE
      • PPC

        public static final GoArch PPC
      • RISCV

        public static final GoArch RISCV
      • RISCV64

        public static final GoArch RISCV64
      • S390

        public static final GoArch S390
      • S390X

        public static final GoArch S390X
      • SPARC

        public static final GoArch SPARC
      • SPARC64

        public static final GoArch SPARC64
      • WASM

        public static final GoArch WASM
    • Method Detail

      • values

        public static GoArch[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GoArch c : GoArch.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GoArch valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getEnvVarValue

        public String getEnvVarValue()
        Returns the environment variable to be used for GOARCH to Go tools.
      • getEnvVarValueForArm

        public String getEnvVarValueForArm()
        Returns the environment variable to be used for GOARM to Go tools.
      • fromString

        public static GoArch fromString​(String name)
        Finds the GoArch from it's name.
        Parameters:
        name - name of the GoArch as defined from Go itself
        Returns:
        GoArch for the matching name
        Throws:
        NoSuchElementException - when a GoArch is not found for the name