compiler.Value abstraction for docstring and incompletekind
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
@@ -110,7 +110,7 @@ func FormatValue(val *compiler.Value) string {
|
||||
return "dagger.#Secret"
|
||||
}
|
||||
if val.IsConcreteR() != nil {
|
||||
return val.Cue().IncompleteKind().String()
|
||||
return val.IncompleteKindString()
|
||||
}
|
||||
// value representation in Cue
|
||||
valStr := fmt.Sprintf("%v", val.Cue())
|
||||
@@ -121,7 +121,7 @@ func FormatValue(val *compiler.Value) string {
|
||||
// ValueDocString returns the value doc from the comment lines
|
||||
func ValueDocString(val *compiler.Value) string {
|
||||
docs := []string{}
|
||||
for _, c := range val.Cue().Doc() {
|
||||
for _, c := range val.Doc() {
|
||||
docs = append(docs, strings.TrimSpace(c.Text()))
|
||||
}
|
||||
doc := strings.Join(docs, " ")
|
||||
|
@@ -57,15 +57,6 @@ var listCmd = &cobra.Command{
|
||||
for _, inp := range inputs {
|
||||
isConcrete := (inp.IsConcreteR() == nil)
|
||||
_, hasDefault := inp.Default()
|
||||
// valStr := "-"
|
||||
// if isConcrete {
|
||||
// valStr, _ = inp.Cue().String()
|
||||
// }
|
||||
// if hasDefault {
|
||||
// valStr = fmt.Sprintf("%s (default)", valStr)
|
||||
// }
|
||||
|
||||
// valStr = strings.ReplaceAll(valStr, "\n", "\\n")
|
||||
|
||||
if !viper.GetBool("all") {
|
||||
// skip input that is not overridable
|
||||
|
Reference in New Issue
Block a user