Re-add old code (commented)
Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
parent
f34f1d96c1
commit
cc9c9f6b95
@ -54,6 +54,23 @@ type Package struct {
|
||||
func Parse(ctx context.Context, packageName string, val *compiler.Value) *Package {
|
||||
lg := log.Ctx(ctx)
|
||||
|
||||
// parseValues := func(field string, values []*compiler.Value) []Value {
|
||||
// val := []Value{}
|
||||
|
||||
// for _, i := range values {
|
||||
// v := Value{}
|
||||
// v.Name = strings.TrimPrefix(
|
||||
// i.Path().String(),
|
||||
// field+".",
|
||||
// )
|
||||
// v.Type = common.FormatValue(i)
|
||||
// v.Description = common.ValueDocOneLine(i)
|
||||
// val = append(val, v)
|
||||
// }
|
||||
|
||||
// return val
|
||||
// }
|
||||
|
||||
fields, err := val.Fields(cue.Definitions(true))
|
||||
if err != nil {
|
||||
lg.Fatal().Err(err).Msg("cannot get fields")
|
||||
|
Reference in New Issue
Block a user