Skip to content

Instantly share code, notes, and snippets.

@madper
Created August 11, 2017 03:55
Show Gist options
  • Save madper/51cb197390a0dece891653ba322f8f0c to your computer and use it in GitHub Desktop.
Save madper/51cb197390a0dece891653ba322f8f0c to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"sync"
)
type bot_instance struct {
running bool
deaded bool
}
type sws struct {
sync.Mutex
whare map[string]bot_instance
}
var sw sws
func main() {
sw.whare["fuck"] = bot_instance{
running: false,
deaded: false,
}
sw.whare["fuck"].deaded = true
fmt.Println(sw.whare["fuck"].deaded)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment