all: Remove unused code

Using x/tools/cmd/deadcode
This commit is contained in:
Bjørn Erik Pedersen
2023-12-18 17:41:15 +01:00
parent 6f13430d4a
commit 8adba648cc
30 changed files with 32 additions and 405 deletions

View File

@@ -129,21 +129,6 @@ type TemplatesProvider interface {
TextTmpl() TemplateParseFinder
}
// WithInfo wraps the info in a template.
func WithInfo(templ Template, info Info) Template {
if manager, ok := info.(InfoManager); ok {
return &templateInfoManager{
Template: templ,
InfoManager: manager,
}
}
return &templateInfo{
Template: templ,
Info: info,
}
}
var baseOfRe = regexp.MustCompile("template: (.*?):")
func extractBaseOf(err string) string {
@@ -173,17 +158,6 @@ type page interface {
IsNode() bool
}
func GetHasLockFromContext(ctx context.Context) bool {
if v := ctx.Value(texttemplate.HasLockContextKey); v != nil {
return v.(bool)
}
return false
}
func SetHasLockInContext(ctx context.Context, hasLock bool) context.Context {
return context.WithValue(ctx, texttemplate.HasLockContextKey, hasLock)
}
func GetCallbackFunctionFromContext(ctx context.Context) any {
return ctx.Value(texttemplate.CallbackContextKey)
}