mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 15:05:28 +02:00
fix: Improve EnumValue documentation
This commit is contained in:
parent
b897906b51
commit
cf2b01b08f
@ -22,6 +22,10 @@ type EnumValue struct {
|
||||
}
|
||||
|
||||
func (v EnumValue) GetTypeDescription() []string {
|
||||
if len(v.Values) == 1 {
|
||||
return []string{fmt.Sprintf("'%s'", v.Values[0])}
|
||||
}
|
||||
|
||||
lines := make([]string, len(v.Values)+1)
|
||||
lines[0] = "Enum of:"
|
||||
|
||||
@ -78,7 +82,7 @@ func (v ArrayValue) GetTypeDescription() []string {
|
||||
subValue := v.SubValue.(Value)
|
||||
|
||||
return append(
|
||||
[]string{"An Array separated by " + v.Separator + " of:"},
|
||||
[]string{fmt.Sprintf("An Array separated by '%s' of:", v.Separator)},
|
||||
subValue.GetTypeDescription()...,
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user