Browse Source

format code

pull/279/head
tnextday 10 years ago
parent
commit
c12e45f9b2
  1. 5
      go/weed/weed_server/master_server_handlers_admin.go

5
go/weed/weed_server/master_server_handlers_admin.go

@ -205,13 +205,13 @@ func (ms *MasterServer) setReplicaHandler(w http.ResponseWriter, r *http.Request
writeJson(w, r, http.StatusOK, result) writeJson(w, r, http.StatusOK, result)
} }
func (ms *MasterServer) batchSetVolumeOption(settingKey, settingValue string, volumes, collections []string)(result map[string]interface{}){
func (ms *MasterServer) batchSetVolumeOption(settingKey, settingValue string, volumes, collections []string) (result map[string]interface{}) {
forms := url.Values{} forms := url.Values{}
forms.Set("key", settingKey) forms.Set("key", settingKey)
forms.Set("value", settingValue) forms.Set("value", settingValue)
if len(volumes) == 0 && len(collections) == 0 { if len(volumes) == 0 && len(collections) == 0 {
forms.Set("all", "true") forms.Set("all", "true")
}else{
} else {
forms["volume"] = volumes forms["volume"] = volumes
forms["collection"] = collections forms["collection"] = collections
} }
@ -241,4 +241,3 @@ func (ms *MasterServer) batchSetVolumeOption(settingKey, settingValue string, vo
wg.Wait() wg.Wait()
return return
} }
Loading…
Cancel
Save