Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.14 KB

advanced.md

File metadata and controls

35 lines (27 loc) · 1.14 KB

Advanced

Reviewed

  • context (https://blog.golang.org/context)
    • Not super interesting. Just used by requests to signal: "hey, cancel this request." As in, let's say you make a DB call, and hand it to a SQL driver. But then that takes too long. In the meantime, you don't need the answer anymore. So you can cancel the request by closing a channel.

Reflect

  • I reviewed this. Not hyperinteresting.
  • Kinda interesting how reflect relates to interface. To get a reflect.Value you call reflect.ValueOf on an interface{}.
  • If the interface{} stores a non-ptr value, you can't mutate it using reflection, because the interface holds a copy of that value.

Assorted Advanced Packages (unreviewed)

unsafe atomic

Also: go test.