mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-22 03:20:07 +08:00
go fmt
This commit is contained in:
@@ -109,11 +109,9 @@ func startMasterFollower(masterOptions MasterOptions) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
option := masterOptions.toMasterOption(nil)
|
option := masterOptions.toMasterOption(nil)
|
||||||
option.IsFollower = true
|
option.IsFollower = true
|
||||||
|
|
||||||
|
|
||||||
r := mux.NewRouter()
|
r := mux.NewRouter()
|
||||||
ms := weed_server.NewMasterServer(r, option, masters)
|
ms := weed_server.NewMasterServer(r, option, masters)
|
||||||
listeningAddress := *masterOptions.ipBind + ":" + strconv.Itoa(*masterOptions.port)
|
listeningAddress := *masterOptions.ipBind + ":" + strconv.Itoa(*masterOptions.port)
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ func (fs *FilerSource) LookupFileId(part string) (fileUrls []string, err error)
|
|||||||
func (fs *FilerSource) ReadPart(fileId string) (filename string, header http.Header, resp *http.Response, err error) {
|
func (fs *FilerSource) ReadPart(fileId string) (filename string, header http.Header, resp *http.Response, err error) {
|
||||||
|
|
||||||
if fs.proxyByFiler {
|
if fs.proxyByFiler {
|
||||||
return util.DownloadFile("http://" + fs.address + "/?proxyChunkId=" + fileId, "")
|
return util.DownloadFile("http://"+fs.address+"/?proxyChunkId="+fileId, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
fileUrls, err := fs.LookupFileId(fileId)
|
fileUrls, err := fs.LookupFileId(fileId)
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ func markVolumeWritable(grpcDialOption grpc.DialOption, volumeId needle.VolumeId
|
|||||||
func markVolumeReplicasWritable(grpcDialOption grpc.DialOption, volumeId needle.VolumeId, locations []wdclient.Location, writable bool) error {
|
func markVolumeReplicasWritable(grpcDialOption grpc.DialOption, volumeId needle.VolumeId, locations []wdclient.Location, writable bool) error {
|
||||||
for _, location := range locations {
|
for _, location := range locations {
|
||||||
fmt.Printf("markVolumeReadonly %d on %s ...\n", volumeId, location.Url)
|
fmt.Printf("markVolumeReadonly %d on %s ...\n", volumeId, location.Url)
|
||||||
if err:= markVolumeWritable(grpcDialOption, volumeId, location.Url, writable); err != nil {
|
if err := markVolumeWritable(grpcDialOption, volumeId, location.Url, writable); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user