Documentation
¶
Index ¶
Constants ¶
View Source
const A = 1
Constants with complex expressions
View Source
const B = 3
View Source
const BoolFromInt = true
View Source
const BoolFromString = true
View Source
const C = 9
View Source
const Complex1 = 5673
Constants for testing complex expressions and bitwise operations
View Source
const Complex2 = 78547
View Source
const Complex3 = 31
View Source
const Complex4 = 31
View Source
const Complex5 = 31
View Source
const D = 7
View Source
const E = 28
View Source
const F = 1052
View Source
const FloatFromBool = 0.0
View Source
const FloatFromInt = 42.0
View Source
const FormattedString1 = "The answer is 42"
View Source
const FormattedString2 = "Pi is approximately 3.14"
View Source
const FormattedString3 = "Hello World\n"
View Source
const G = 1052
View Source
const H = 5672
View Source
const I = 5673.618 // Approximation of golden ratio
View Source
const IntFromBool = 1
Constants using built-in functions
View Source
const IntFromFloat = 3
View Source
const J = 47.28015 // 120 is 5!
View Source
const MaxConnections = 1000
View Source
const MaxInt64 = 9223372036854775807 // 2^63 - 1
View Source
const MaxValue = 5673
View Source
const MinInt64 = -9223372036854775808 // -2^63
View Source
const MinValue = 1
View Source
const Pi = 3.14159265358979323846
View Source
const ServerName = "Comprehensive Test Server"
Constants
View Source
const StringLength = 13
Constants with function calls
View Source
const Version = "1.0.0"
View Source
const XX = 1 // XX value
XX constant XX value 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComplexStruct ¶
type ComplexStruct struct {
Flag bool
TinyInt int8
SmallInt int16
MediumInt int32
BigInt int64
DefaultInt int
SinglePrecision float32
DoublePrecision float64
Text string
SingleByte byte
ByteArray []byte
FixedArray [5]int
DynamicArray []string
IntArray []int
Dictionary map[string]int
}
Struct with various field types
type FilePermission ¶
type FilePermission int32
Enum with complex iota usage
const ( FilePermissionNone FilePermission = 0 FilePermissionExecute FilePermission = 1 FilePermissionWrite FilePermission = 2 FilePermissionRead FilePermission = 4 FilePermissionUserRead FilePermission = 4 FilePermissionUserWrite FilePermission = 32 FilePermissionUserExecute FilePermission = 256 FilePermissionGroupRead FilePermission = 2048 FilePermissionGroupWrite FilePermission = 16384 FilePermissionGroupExecute FilePermission = 131072 FilePermissionOthersRead FilePermission = 1048576 FilePermissionOthersWrite FilePermission = 8388608 FilePermissionOthersExecute FilePermission = 67108864 // 4|32|256|2048|16384|131072|1048576|8388608|67108864 // 4 + 32 + 256 + 2048 + 16384 + 131072 + 1048576 + 8388608 + 67108864 FilePermissionAll FilePermission = 76695844 )
type GenericRequest ¶
type GenericResponse ¶
type IotatestEnum ¶
type IotatestEnum int32
Test cases for iota
const ( IotatestEnumA IotatestEnum = 0 // 0 IotatestEnumB IotatestEnum = 1 // 1 IotatestEnumC IotatestEnum = 0 // 0 IotatestEnumD IotatestEnum = 2 // 2 IotatestEnumE IotatestEnum = 0 // 0 IotatestEnumF IotatestEnum = 1 // 1 IotatestEnumG IotatestEnum = 0 // 0 )
type LoginRequest ¶
message types
func (LoginRequest) MessageType ¶
func (LoginRequest) MessageType() int
type LoginResponse ¶
func (LoginResponse) MessageType ¶
func (LoginResponse) MessageType() int
type Month ¶
type Month int32
const ( MonthJanuary Month = 1 MonthFebruary Month = 2 MonthMarch Month = 4 MonthApril Month = 8 MonthMay Month = 16 MonthJune Month = 32 MonthJuly Month = 64 MonthAugust Month = 128 MonthSeptember Month = 256 MonthOctober Month = 512 MonthNovember Month = 1024 MonthDecember Month = 2048 MonthQ1 Month = 7 MonthQ2 Month = 56 MonthQ3 Month = 448 MonthQ4 Month = 3584 )
Click to show internal directories.
Click to hide internal directories.