Skip to content

Instantly share code, notes, and snippets.

@Lyoness
Created August 10, 2016 00:22
Show Gist options
  • Save Lyoness/1eaec1474f5160ca2235dbeee55b8eae to your computer and use it in GitHub Desktop.
Save Lyoness/1eaec1474f5160ca2235dbeee55b8eae to your computer and use it in GitHub Desktop.
golang-studygroup-1
##Notes, linkdump, for golang-studygroup-1 on 9-August-2016
https://play.golang.org/p/dJLQZz-hVY - byte fun
iota - what is it?
Golang truthiness numbers?
https://golang.org/pkg/log/#New
Constants
const (
// Bits or'ed together to control what's printed.
// There is no control over the order they appear (the order listed
// here) or the format they present (as described in the comments).
// The prefix is followed by a colon only when Llongfile or Lshortfile
// is specified.
// For example, flags Ldate | Ltime (or LstdFlags) produce,
// 2009/01/23 01:23:23 message
// while flags Ldate | Ltime | Lmicroseconds | Llongfile produce,
// 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message
Ldate = 1 << iota // the date in the local time zone: 2009/01/23
Ltime // the time in the local time zone: 01:23:23
Lmicroseconds // microsecond resolution: 01:23:23.123123. assumes Ltime.
Llongfile // full file name and line number: /a/b/c/d.go:23
Lshortfile // final file name element and line number: d.go:23. overrides Llongfile
LUTC // if Ldate or Ltime is set, use UTC rather than the local time zone
LstdFlags = Ldate | Ltime // initial values for the standard logger
)
int as a bool in golang?
allocate the flag's value in a single byte.
Use case: write your own lib that exposes flags and use less memory
check the reference
quicker hop to the memory than a bool
Great Question: does it ever make sense to use flags in non-binary data?
The concept of Mechanical Sympathy
Bitwise Operations?
https://changelog.com/gotime-6/
Concurrency, Event-Driven programming
Buffered Channels and Unbuffered Channels - what are they? How and when to use them? slack channel?
"device drivers, low-level graphics, communications protocol packet assembly, and decoding."
https://github.com/golang/net/blob/master/context/context.go#L133
https://blog.golang.org/context
https://vimeo.com/115309491
distributed tracing golang
https://github.com/go-kit/kit
lunk provides a set of tools for structured logging in the style of Google's Dapper
https://github.com/codahale/lunk
https://github.com/womenwhogonyc/chat - starter things to build
Learing Redigo, Revel (web framework in Go), boltdb, to make a chat server
APIs in golang? How to structure your code? Best practices (Ben Johnson's slide)
Chapters 10 and 11 for goinaction book? can we ask Bill for them?
##TOSTUDY and Discuss for Thursday 11 August 2016
Chapter 4 - slices, arrays
SEE YOU THURSDAY :D :D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment