SIGQUIT can be invoked via CTRL + \.
If this doesn't work (because of other keyboard settings) you can also do killall -QUIT <processname> or killall -ABRT <processname>.
SIGQUIT can be invoked via CTRL + \.
If this doesn't work (because of other keyboard settings) you can also do killall -QUIT <processname> or killall -ABRT <processname>.
This can be provided via a path in ZONEINFO environment variable, some standard OS locations (f.e. /usr/share/zoneinfo on UNIX).
This can be provided via a path in ZONEINFO environment variable, some standard OS locations (f.e. /usr/share/zoneinfo on UNIX).
If you use pointers as map values and then delete the elements, the memory for the values will be freed, but the memory for the map itself will still be allocated.
If you use pointers as map values and then delete the elements, the memory for the values will be freed, but the memory for the map itself will still be allocated.
a := &[3]string{"a", "b", "c"}
fmt.Println(a[1])
It is not possible to do the same thing with slices.
a := &[3]string{"a", "b", "c"}
fmt.Println(a[1])
It is not possible to do the same thing with slices.
g := []string(nil)
In this example nil is converted to the type []string, e.g. a slice of strings
g := []string(nil)
In this example nil is converted to the type []string, e.g. a slice of strings
var number = 5
var pointer *int = &number
var pointerToPointer **int = &pointer
fmt.Println(**pointerToPointer)
Note the **int type of the pointerToPointer variable.
var number = 5
var pointer *int = &number
var pointerToPointer **int = &pointer
fmt.Println(**pointerToPointer)
Note the **int type of the pointerToPointer variable.
For example:
test := "\xdc"
fmt.Printf("%q", test)
will print the value of test in quotes.
If we change the value of test to "\x64", "d" will be printed.
For example:
test := "\xdc"
fmt.Printf("%q", test)
will print the value of test in quotes.
If we change the value of test to "\x64", "d" will be printed.
A for key, value := range loop, however, retrieves runes as values and byte starting positions as keys.
Further read: go.dev/blog/strings
A for key, value := range loop, however, retrieves runes as values and byte starting positions as keys.
Further read: go.dev/blog/strings
const untyped = "abc"
const typed string = "def"
Untyped constants can be not only assigned to string variables, but also to variables of a type which is a string alias.
More on this in the golang blog: go.dev/blog/constants
const untyped = "abc"
const typed string = "def"
Untyped constants can be not only assigned to string variables, but also to variables of a type which is a string alias.
More on this in the golang blog: go.dev/blog/constants
Executing a code which sends to or receives from a nil channel results in a deadlock error.
Executing a code which sends to or receives from a nil channel results in a deadlock error.