File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 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
1921func 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+
2329func GetAPIInstance (ctx context.Context ) unsplash.Api {
2430 return ctx .Value (APIInstance ).(unsplash.Api )
2531}
You can’t perform that action at this time.
0 commit comments