Enum GoOs

  • All Implemented Interfaces:
    Serializable, Comparable<GoOs>

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

      • AIX

        public static final GoOs AIX
      • ANDROID

        public static final GoOs ANDROID
      • DARWIN

        public static final GoOs DARWIN
      • DRAGONFLY

        public static final GoOs DRAGONFLY
      • FREEBSD

        public static final GoOs FREEBSD
      • HURD

        public static final GoOs HURD
      • JS

        public static final GoOs JS
      • LINUX

        public static final GoOs LINUX
      • NACL

        public static final GoOs NACL
      • NETBSD

        public static final GoOs NETBSD
      • OPENBSD

        public static final GoOs OPENBSD
      • PLAN9

        public static final GoOs PLAN9
      • SOLARIS

        public static final GoOs SOLARIS
      • WINDOWS

        public static final GoOs WINDOWS
      • ZOS

        public static final GoOs ZOS
    • Method Detail

      • values

        public static GoOs[] 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 (GoOs c : GoOs.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GoOs 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 GOOS to Go tools.
      • fromPlatform

        public static GoOs fromPlatform​(Platform platform)
                                 throws HumanReadableException
        returns the corresponding GoOs for a given Platform
        Parameters:
        platform - the Platform to lookup
        Returns:
        GoOs for the matching platform
        Throws:
        HumanReadableException - when a specific GoOS is not found for the Platform