fix: return supported values for flags when calling Values.Type()
Signed-off-by: Jesper Axelsen <jesperbaxelsen@gmail.com> Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
committed by
Matheus Pimenta
parent
b33f173670
commit
28f5b553a2
@@ -49,11 +49,16 @@ func (c *ECDSACurve) Set(str string) error {
|
||||
}
|
||||
|
||||
func (c *ECDSACurve) Type() string {
|
||||
return "ecdsaCurve"
|
||||
keys := make([]string, 0, len(supportedECDSACurves))
|
||||
for k := range supportedECDSACurves {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
return strings.Join(keys, "|")
|
||||
}
|
||||
|
||||
func (c *ECDSACurve) Description() string {
|
||||
return fmt.Sprintf("SSH ECDSA public key curve (%s)", strings.Join(ecdsaCurves(), ", "))
|
||||
return "SSH ECDSA public key curve"
|
||||
}
|
||||
|
||||
func ecdsaCurves() []string {
|
||||
|
||||
Reference in New Issue
Block a user