mirror of
https://github.com/onyx-and-iris/gignore.git
synced 2025-05-18 10:10:32 +01:00
23 lines
495 B
Go
23 lines
495 B
Go
// Package main provides the entry point for the gignore CLI tool,
|
|
// including commands like listing available .gitignore templates.
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/charmbracelet/log"
|
|
"github.com/onyx-and-iris/gignore"
|
|
)
|
|
|
|
type contextKey string
|
|
|
|
const clientKey contextKey = "client"
|
|
|
|
func getClientFromContext(ctx context.Context) *gignore.Client {
|
|
client, ok := ctx.Value(clientKey).(*gignore.Client)
|
|
if !ok {
|
|
log.Fatal("Client not found in context")
|
|
}
|
|
return client
|
|
}
|