mirror of
https://github.com/onyx-and-iris/ignr.git
synced 2026-04-18 07:13:33 +00:00
move files into root of repo
This commit is contained in:
16
context.go
Normal file
16
context.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/go-github/v72/github"
|
||||
)
|
||||
|
||||
type contextKey string
|
||||
|
||||
const clientKey contextKey = "client"
|
||||
|
||||
func getClientFromContext(ctx context.Context) (*github.Client, bool) {
|
||||
client, ok := ctx.Value(clientKey).(*github.Client)
|
||||
return client, ok
|
||||
}
|
||||
Reference in New Issue
Block a user