diff --git a/internal/core/adt/context.go b/internal/core/adt/context.go index d9ee22d3fae..57269551f21 100644 --- a/internal/core/adt/context.go +++ b/internal/core/adt/context.go @@ -111,14 +111,6 @@ func init() { log.SetFlags(log.Lshortfile) } -func Logf(format string, args ...interface{}) { - if Verbosity == 0 { - return - } - s := fmt.Sprintf(format, args...) - _ = log.Output(2, s) -} - var pMap = map[*Vertex]int{} func (c *OpContext) Logf(v *Vertex, format string, args ...interface{}) { diff --git a/internal/internal.go b/internal/internal.go index 7c91a93a32c..c944f88398f 100644 --- a/internal/internal.go +++ b/internal/internal.go @@ -325,33 +325,6 @@ func ToFile(n ast.Node) *ast.File { } } -// ToStruct gets the non-preamble declarations of a file and puts them in a -// struct. -func ToStruct(f *ast.File) *ast.StructLit { - start := 0 - for i, d := range f.Decls { - switch d.(type) { - case *ast.Package, *ast.ImportDecl: - start = i + 1 - case *ast.Attribute, *ast.CommentGroup: - default: - break - } - } - s := ast.NewStruct() - s.Elts = f.Decls[start:] - return s -} - -func IsBulkField(d ast.Decl) bool { - if f, ok := d.(*ast.Field); ok { - if _, ok := f.Label.(*ast.ListLit); ok { - return true - } - } - return false -} - func IsDef(s string) bool { return strings.HasPrefix(s, "#") || strings.HasPrefix(s, "_#") } diff --git a/internal/value/value.go b/internal/value/value.go index 5539475c5e9..5d4dc0426fb 100644 --- a/internal/value/value.go +++ b/internal/value/value.go @@ -20,7 +20,6 @@ import ( "strings" "cuelang.org/go/cue" - "cuelang.org/go/cue/errors" "cuelang.org/go/internal/core/adt" "cuelang.org/go/internal/core/convert" "cuelang.org/go/internal/core/eval" @@ -50,14 +49,6 @@ func Make(ctx *adt.OpContext, v adt.Value) cue.Value { return (*cue.Context)(ctx.Impl().(*runtime.Runtime)).Encode(v) } -func MakeError(r *runtime.Runtime, err errors.Error) cue.Value { - b := &adt.Bottom{Err: err} - node := &adt.Vertex{BaseValue: b} - node.ForceDone() - node.AddConjunct(adt.MakeRootConjunct(nil, b)) - return (*cue.Context)(r).Encode(node) -} - // UnifyBuiltin returns the given Value unified with the given builtin template. func UnifyBuiltin(v cue.Value, kind string) cue.Value { p := strings.Split(kind, ".")