1
2
3
4
5 package main
6
7 import "C"
8
9
10 func ReturnEmpty() {
11 return
12 }
13
14
15 func ReturnOnlyUint8() (uint8, uint8, uint8) {
16 return 1, 2, 3
17 }
18
19
20 func ReturnOnlyUint16() (uint16, uint16, uint16) {
21 return 1, 2, 3
22 }
23
24
25 func ReturnOnlyUint32() (uint32, uint32, uint32) {
26 return 1, 2, 3
27 }
28
29
30 func ReturnOnlyUint64() (uint64, uint64, uint64) {
31 return 1, 2, 3
32 }
33
34
35 func ReturnOnlyInt() (int, int, int) {
36 return 1, 2, 3
37 }
38
39
40 func ReturnOnlyPtr() (*int, *int, *int) {
41 a, b, c := 1, 2, 3
42 return &a, &b, &c
43 }
44
45
46 func ReturnString() string {
47 return "hello"
48 }
49
50
51 func ReturnByteSlice() []byte {
52 return []byte{1, 2, 3}
53 }
54
55
56 func InputAndReturnUint8(a, b, c uint8) (uint8, uint8, uint8) {
57 return a, b, c
58 }
59
60
61 func MixedTypes(a uint8, b uint16, c uint32, d uint64, e int, f *int) (uint8, uint16, uint32, uint64, int, *int) {
62 return a, b, c, d, e, f
63 }
64
View as plain text