cmd/doc: boiler plate and for inputs / outputs scanning

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba
2021-06-02 16:22:38 +02:00
parent 66929f8a63
commit 7b4421b9a0
5 changed files with 150 additions and 4 deletions

View File

@@ -320,7 +320,7 @@ func (e *Environment) ScanInputs(ctx context.Context, mergeUserInputs bool) ([]*
}
}
return scanInputs(ctx, src), nil
return ScanInputs(ctx, src), nil
}
func (e *Environment) ScanOutputs(ctx context.Context) ([]*compiler.Value, error) {
@@ -340,5 +340,5 @@ func (e *Environment) ScanOutputs(ctx context.Context) ([]*compiler.Value, error
}
}
return scanOutputs(ctx, src), nil
return ScanOutputs(ctx, src), nil
}

View File

@@ -42,7 +42,7 @@ func isReference(val cue.Value) bool {
return isRef(val)
}
func scanInputs(ctx context.Context, value *compiler.Value) []*compiler.Value {
func ScanInputs(ctx context.Context, value *compiler.Value) []*compiler.Value {
lg := log.Ctx(ctx)
inputs := []*compiler.Value{}
@@ -67,7 +67,7 @@ func scanInputs(ctx context.Context, value *compiler.Value) []*compiler.Value {
return inputs
}
func scanOutputs(ctx context.Context, value *compiler.Value) []*compiler.Value {
func ScanOutputs(ctx context.Context, value *compiler.Value) []*compiler.Value {
lg := log.Ctx(ctx)
inputs := []*compiler.Value{}