Skip to content

Instantly share code, notes, and snippets.

View dxavx's full-sized avatar
🏠
Working from home

dxavx dxavx

🏠
Working from home
View GitHub Profile
@dxavx
dxavx / strings.go
Created January 5, 2020 22:36
Golang strings
package main
import (
"fmt"
"unicode/utf8"
)
func main() {
// empty string
var str string
@dxavx
dxavx / pointers.go
Created January 5, 2020 19:38
Golang pointers
package main
import "fmt"
func main() {
a := 2
b := &a
*b = 3 // a = 3
c := &a // new variable pointer A
fmt.Println(a, b, c)
@dxavx
dxavx / const.go
Last active January 5, 2020 21:28
Golang const
package main
import "fmt"
const pi = 3.14
const (
hello = "Hello"
e = 2.718
)