mirror of https://github.com/docker/docs.git
Avoid panic when stripping empty string
Signed-off-by: Darren Shepherd <darren@rancher.com>
This commit is contained in:
parent
70cc567c46
commit
7013b45dde
|
@ -29,7 +29,7 @@ type OsRelease struct {
|
|||
}
|
||||
|
||||
func stripQuotes(val string) string {
|
||||
if val[0] == '"' {
|
||||
if len(val) > 0 && val[0] == '"' {
|
||||
return val[1 : len(val)-1]
|
||||
}
|
||||
return val
|
||||
|
|
Loading…
Reference in New Issue