Go Base Library

The Go Base Library is a library of APIs commonly used by Go applications.

Different form our approach on the Swift Base Library, the Go Base Library is not implemented from scratch. Instead it is a fork of the official base library provided by Google's Go Language team, which is licensed under a BSD-style license.

The library falls into two distinct categories of files:

  • all .go files are maintained as exact copies of the originals, to ensure all types work and behave in the exact same way as with standard Go, and that the form remains upgradable as the Go team evolves their standard library.
  • all .pas files are additional files we provide, to implement functionality that is not available as pure Go code (i.e. where the standard Go library relies on external code as well, be it operating system APIs or functionality provided by different libraries.

With a combination of the two, the Go Base Library provides a fully Elements-native functionality of the exposed feature set.

Supported Platforms

The Go Base Library is available for .NET and Island-backed platforms (except WebAssembly). This includes Cocoa, Android NDK Windows and Linux.

Due to platform limitations, it is not currently available for Java and Android SDK projects, for the legacy Toffee V1 Cocoa projects (It is supported for newer Island/Darwin-based Cocoa projects), or for WebAssembly

The Go language syntax itself, and the ability to compile .go files is of course supported on all these platforms, it is just the base library that is not available.


The Go Base Library ships precompiled with the Elements compiler, and new .NET and Island-based projects created with one of the RemObjects Gold project templates will automatically have a reference to it. If you are adding Go files to a project that started out with a different language, you can add a reference to your projects via the Add References dialog in Fire, Water or Visual Studio, where the Go library should show automatically.

The library is called Go.dll on .NET and Go.fx on Island. Its content is contained in the a variety of namespaces.

While it is not their intended use, most of the types and functions exposed in the library are perfectly valid to be used from Oxygene, C#, Swift and Java, as well. In these languages, the builtin namespace will need to be explicitly specified or added to the uses/using/import section.

Source Code

The Go Base Library is open source and implemented in Go and Oxygene. You can find the source code on GitHub, and contributions and pull requests are more than welcome.

Note that you will need the very latest compiler to rebuild the GBL, and in some cases, the git repository might even contain code that requires a later compiler than is available. Refer to the commit messages for details on this, and check out an older revision, if necessary.






  • bool = Boolean
  • byte = Byte  .NET, .NET Standard 2.0, Island
  • CancelFunc = CancelFunc  .NET, .NET Standard 2.0, Island
  • ChanDir = int  .NET, .NET Standard 2.0, Island
  • Context = Context  .NET, .NET Standard 2.0, Island
  • DecrypterOpts = Object  .NET, .NET Standard 2.0, Island
  • float32 = Single
  • float64 = Double
  • int = Int64  .NET, .NET Standard 2.0, Island
  • int16 = Int16  .NET, .NET Standard 2.0, Island
  • int32
    • Int32  .NET, .NET Standard 2.0, Island
    • Integer  Cooper
  • int8 = SByte  .NET, .NET Standard 2.0, Island
  • intptr
  • Kind = uint  .NET, .NET Standard 2.0, Island
  • PlatformField
    • FieldInfo  .NET, .NET Standard 2.0
    • FieldInfo  Island
  • PlatformMethod
    • MethodInfo  .NET, .NET Standard 2.0
    • MethodInfo  Island
  • PlatformTimer
    • Timer  .NET, .NET Standard 2.0
    • Timer  Island
  • PlatformType
    • Type  .NET, .NET Standard 2.0
    • Type  Island
  • PrivateKey = Object  .NET, .NET Standard 2.0, Island
  • ProcessType
    • Process  .NET, .NET Standard 2.0
    • Process  Island
  • PublicKey = Object  .NET, .NET Standard 2.0, Island
  • TCPConn = IPConn  .NET, .NET Standard 2.0, Island
  • Token = Object  .NET, .NET Standard 2.0, Island
  • Token = Object  .NET, .NET Standard 2.0, Island
  • Token = Object  .NET, .NET Standard 2.0, Island
  • UDPConn = IPConn  .NET, .NET Standard 2.0, Island
  • uint = UInt64  .NET, .NET Standard 2.0, Island
  • uint16 = UInt16  .NET, .NET Standard 2.0, Island
  • uint32
  • uint8 = Byte  .NET, .NET Standard 2.0, Island
  • uintptr
  • UnixConn = IPConn  .NET, .NET Standard 2.0, Island
  • Value = Object  .NET, .NET Standard 2.0, Island

See Also