lgtm lets uses add github integrations to the slack channel #pr-party for posting to the channel when a new pull request opens.
- OAuth2 flow with github to be able to make web hooks on a users repos
- github.com/golang/oauth2
- Any OAuth token
| package main | |
| import ( | |
| "encoding/binary" | |
| "fmt" | |
| "math" | |
| "os" | |
| "github.com/mesilliac/pulse-simple" | |
| "github.com/mjibson/go-dsp/wav" |
| package viz | |
| import ( | |
| "log" | |
| "math" | |
| "os" | |
| "github.com/mjibson/go-dsp/fft" | |
| "github.com/mjibson/go-dsp/wav" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "github.com/pkg/errors" | |
| flag "github.com/spf13/pflag" | |
| ) |
lgtm lets uses add github integrations to the slack channel #pr-party for posting to the channel when a new pull request opens.
| $ echo -e "yoyo my G-lib,\nI know u think your pretty tough.\nBut you aint got MUSL" | gophersay | |
| ------------------------ | |
| yoyo my G-lib, | |
| I know u think your pretty tough. | |
| But you aint got MUSL | |
| ------------------------ | |
| \ | |
| \ | |
| \ ,_---~~~~~----._ | |
| _,,_,*^____ _____``*g*\"*, |
| $ echo -e "yoyo my G-lib,\nI know u think your pretty tough.\nU aint got MUSL" | gophersay | |
| ------------------------ | |
| yoyo my G-lib, | |
| I know u think your pretty tough. | |
| U aint got MUSL | |
| ------------------------ | |
| \ | |
| \ | |
| \ ,_---~~~~~----._ | |
| _,,_,*^____ _____``*g*\"*, |
All of this came to mind reading through python code which passed a logger through the application. I mentally contrasted this pattern with a golang logger I created. This golang logger had an exported package level variable which was initialized as a logger without any functions being called. Said logger could be accessed directly from an import anywhere in the application.
As a result of this consideration, I wrote this document to get out my thoughts loggers wired through vs globally accessible via import.