enhance:go fmt updated by go1.17

Signed-off-by: leonrayang <chl696@sina.com>
This commit is contained in:
leonrayang 2023-05-26 09:56:01 +08:00 committed by leonrayang
parent f8c418f375
commit 31797d462a
13 changed files with 23 additions and 12 deletions

View File

@ -1,5 +1,6 @@
// Test for adjustable timeout between a FUSE request and the daemon's response.
//
//go:build darwin || freebsd
// +build darwin freebsd
package fuse_test

View File

@ -1,6 +1,7 @@
// This file contains tests for platforms that have no escape
// mechanism for including commas in mount options.
//
//go:build darwin
// +build darwin
package fuse_test

View File

@ -1,3 +1,4 @@
//go:build !darwin
// +build !darwin
package syscallx

View File

@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package fuse

View File

@ -1,3 +1,4 @@
//go:build go1.8
// +build go1.8
package memfs_test

View File

@ -1,3 +1,4 @@
//go:build !go1.8
// +build !go1.8
package memfs_test

View File

@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package fuse

View File

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows
package cobra

View File

@ -1,3 +1,4 @@
//go:build windows
// +build windows
package cobra

View File

@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build linux
// +build linux
package wal

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build windows
// +build windows
package log

View File

@ -4250,12 +4250,12 @@ func (m *Server) getMetaPartition(w http.ResponseWriter, r *http.Request) {
}
for i := 0; i < len(replicas); i++ {
replicas[i] = &proto.MetaReplicaInfo{
Addr: mp.Replicas[i].Addr,
DomainAddr: mp.Replicas[i].metaNode.DomainAddr,
MaxInodeID: mp.Replicas[i].MaxInodeID,
ReportTime: mp.Replicas[i].ReportTime,
Status: mp.Replicas[i].Status,
IsLeader: mp.Replicas[i].IsLeader,
Addr: mp.Replicas[i].Addr,
DomainAddr: mp.Replicas[i].metaNode.DomainAddr,
MaxInodeID: mp.Replicas[i].MaxInodeID,
ReportTime: mp.Replicas[i].ReportTime,
Status: mp.Replicas[i].Status,
IsLeader: mp.Replicas[i].IsLeader,
InodeCount: mp.Replicas[i].InodeCount,
DentryCount: mp.Replicas[i].DentryCount,
}

View File

@ -91,12 +91,12 @@ type MetaPartitionInfo struct {
// MetaReplica defines the replica of a meta partition
type MetaReplicaInfo struct {
Addr string
DomainAddr string
MaxInodeID uint64
ReportTime int64
Status int8 // unavailable, readOnly, readWrite
IsLeader bool
Addr string
DomainAddr string
MaxInodeID uint64
ReportTime int64
Status int8 // unavailable, readOnly, readWrite
IsLeader bool
InodeCount uint64
DentryCount uint64
}