Misc

This page contains information about the template functions related to other functionality:

  • IsBool( a: any ): bool → Checks if the argument has a boolean type;
  • IsInteger( a: any ): bool → Checks if the argument has an integer type;
  • IsFloat( a: any ): bool → Checks if the argument has a float type;
  • IsString( a: any ): bool → Checks if the argument has a string type;
  • IsRune( a: any ): bool → Checks if the argument has a rune type;
  • IsSlice( a: any ): bool → Checks if the argument has a slice type;
  • IsMap( a: any ): bool → Checks if the argument has a map type;
  • Sizeof( a: Number ): Sizes → Returns the size of the number, either 8, 16, 32, 64 or Unknown;
  • IsSigned( a: Number ): bool → Checks if the number is signed or not;
  • TypeOf( a: any ): string → Returns a string corresponding to the type of a, either bool, integer, float, string, rune, slice or map.

Sizes is an enum with:

package x

type Sizes int

const (
  SIZE_8       Sizes = iota
  SIZE_16      Sizes
  SIZE_32      Sizes
  SIZE_64      Sizes
  SIZE_UNKNOWN Sizes
)