Skip to content

Commit 68c43a8

Browse files
committed
Usage: better_cat <file>
1 parent d5e4a03 commit 68c43a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/keys/context.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55

66
"github.com/rawnly/splash-cli/lib/analytics"
7+
"github.com/rawnly/splash-cli/lib/telemetry"
78
"github.com/rawnly/splash-cli/unsplash"
89
"github.com/spf13/cast"
910
)
@@ -14,12 +15,17 @@ const (
1415
APIInstance contextKey = "api"
1516
IsLogged contextKey = "isLoggedIn"
1617
Analytics contextKey = "analytics"
18+
Telemetry contextKey = "telemetry"
1719
)
1820

1921
func GetAnalyticsInstance(ctx context.Context) *analytics.Analytics {
2022
return ctx.Value(Analytics).(*analytics.Analytics)
2123
}
2224

25+
func GetTelemetryInstance(ctx context.Context) *telemetry.Telemetry {
26+
return ctx.Value(Telemetry).(*telemetry.Telemetry)
27+
}
28+
2329
func GetAPIInstance(ctx context.Context) unsplash.Api {
2430
return ctx.Value(APIInstance).(unsplash.Api)
2531
}

0 commit comments

Comments
 (0)