Explorar el Código

http: use sort.Strings

Yicheng Qin hace 11 años
padre
commit
01871e7c29
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      etcdserver/etcdhttp/http.go

+ 1 - 1
etcdserver/etcdhttp/http.go

@@ -215,7 +215,7 @@ func (h Handler) serveMachines(w http.ResponseWriter, r *http.Request) {
 			urls = append(urls, addScheme(addr))
 			urls = append(urls, addScheme(addr))
 		}
 		}
 	}
 	}
-	sort.Sort(sort.StringSlice(urls))
+	sort.Strings(urls)
 	w.Write([]byte(strings.Join(urls, ", ")))
 	w.Write([]byte(strings.Join(urls, ", ")))
 }
 }