Skip to content

Instantly share code, notes, and snippets.

View AleksandarMuradyan's full-sized avatar

Aleksandar.Muradyan AleksandarMuradyan

View GitHub Profile
package main
import (
"fmt"
"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)
func main() {
c, err := kafka.NewConsumer(&kafka.ConfigMap{
@AleksandarMuradyan
AleksandarMuradyan / struct_as_map_key.go
Created June 28, 2021 14:56 — forked from cevaris/struct_as_map_key.go
Golang: Using structs as key for Maps
package main
import "fmt"
type A struct {
a, b int
}
func MapStructValAsKey(){
// Notice: We are using value of `A`, not `*A`
@AleksandarMuradyan
AleksandarMuradyan / values_pointers.go
Last active June 28, 2021 12:55 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value