aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-07-28 18:34:15 -0700
committerChris Lu <chris.lu@gmail.com>2018-07-28 18:34:15 -0700
commitcfbfc7cb67db224bdf6b0b533162d16039245f52 (patch)
tree01ae4a3000db1f61d603016e665858641342b3ea
parent4e0522a80ca5933f9a4c89b274fcef65e4bef4d9 (diff)
downloadseaweedfs-cfbfc7cb67db224bdf6b0b533162d16039245f52.tar.xz
seaweedfs-cfbfc7cb67db224bdf6b0b533162d16039245f52.zip
fix compilation error
-rw-r--r--weed/operation/delete_content.go2
-rw-r--r--weed/wdclient/masterclient.go4
-rw-r--r--weed/wdclient/vid_map.go6
3 files changed, 6 insertions, 6 deletions
diff --git a/weed/operation/delete_content.go b/weed/operation/delete_content.go
index 2d7e71c6e..41f98e4d4 100644
--- a/weed/operation/delete_content.go
+++ b/weed/operation/delete_content.go
@@ -22,7 +22,7 @@ type DeleteResult struct {
}
func DeleteFromVolumeServer(fileUrlOnVolume string, jwt security.EncodedJwt) error {
- err = util.Delete(fileUrlOnVolume, jwt)
+ err := util.Delete(fileUrlOnVolume, jwt)
if err != nil {
return fmt.Errorf("Failed to delete %s:%v", fileUrlOnVolume, err)
}
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go
index 13383c9f1..d2d5954e4 100644
--- a/weed/wdclient/masterclient.go
+++ b/weed/wdclient/masterclient.go
@@ -68,10 +68,10 @@ func (mc *MasterClient) tryAllMasters() {
PublicUrl: volumeLocation.PublicUrl,
}
for _, newVid := range volumeLocation.NewVids {
- mc.AddLocation(newVid, loc)
+ mc.addLocation(newVid, loc)
}
for _, deletedVid := range volumeLocation.DeletedVids {
- mc.DeleteLocation(deletedVid, loc)
+ mc.deleteLocation(deletedVid, loc)
}
}
}
diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go
index 93884c53d..7299606af 100644
--- a/weed/wdclient/vid_map.go
+++ b/weed/wdclient/vid_map.go
@@ -40,7 +40,7 @@ func (vc *VidMap) LookupFileId(fileId string) (fullUrl string, err error) {
if len(parts) != 2 {
return "", errors.New("Invalid fileId " + fileId)
}
- serverUrl, lookupError := LookupVolumeServerUrl(parts[0])
+ serverUrl, lookupError := vc.LookupVolumeServerUrl(parts[0])
if lookupError != nil {
return "", lookupError
}
@@ -54,7 +54,7 @@ func (vc *VidMap) GetLocations(vid uint32) (locations []Location) {
return vc.vid2Locations[vid]
}
-func (vc *VidMap) AddLocation(vid uint32, location Location) {
+func (vc *VidMap) addLocation(vid uint32, location Location) {
vc.Lock()
defer vc.Unlock()
@@ -74,7 +74,7 @@ func (vc *VidMap) AddLocation(vid uint32, location Location) {
}
-func (vc *VidMap) DeleteLocation(vid uint32, location Location) {
+func (vc *VidMap) deleteLocation(vid uint32, location Location) {
vc.Lock()
defer vc.Unlock()