Skip to content

Commit ab3b32f

Browse files
committed
优化代码
1 parent cafab78 commit ab3b32f

File tree

19 files changed

+37
-40
lines changed

19 files changed

+37
-40
lines changed

internal/const/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright 2021 Liuxiangchao [email protected]. All rights reserved.
2-
// +build !plus
2+
//go:build !plus
33

44
package teaconst
55

internal/const/plus.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 Liuxiangchao [email protected]. All rights reserved.
22
//go:build !plus
3-
// +build !plus
43

54
package teaconst
65

internal/rpc/rpc_client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ func (this *RPCClient) RegionCityRPC() pb.RegionCityServiceClient {
348348
return pb.NewRegionCityServiceClient(this.pickConn())
349349
}
350350

351+
func (this *RPCClient) RegionTownRPC() pb.RegionTownServiceClient {
352+
return pb.NewRegionTownServiceClient(this.pickConn())
353+
}
354+
351355
func (this *RPCClient) RegionProviderRPC() pb.RegionProviderServiceClient {
352356
return pb.NewRegionProviderServiceClient(this.pickConn())
353357
}

internal/utils/nodelogutils/utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 Liuxiangchao [email protected]. All rights reserved.
22
//go:build !plus
3-
// +build !plus
43

54
package nodelogutils
65

internal/utils/service_linux.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build linux
1+
//go:build linux
22

33
package utils
44

@@ -15,7 +15,7 @@ import (
1515
var systemdServiceFile = "/etc/systemd/system/edge-admin.service"
1616
var initServiceFile = "/etc/init.d/" + teaconst.SystemdServiceName
1717

18-
// 安装服务
18+
// Install 安装服务
1919
func (this *ServiceManager) Install(exePath string, args []string) error {
2020
if os.Getgid() != 0 {
2121
return errors.New("only root users can install the service")
@@ -29,7 +29,7 @@ func (this *ServiceManager) Install(exePath string, args []string) error {
2929
return this.installSystemdService(systemd, exePath, args)
3030
}
3131

32-
// 启动服务
32+
// Start 启动服务
3333
func (this *ServiceManager) Start() error {
3434
if os.Getgid() != 0 {
3535
return errors.New("only root users can start the service")
@@ -46,7 +46,7 @@ func (this *ServiceManager) Start() error {
4646
return exec.Command("service", teaconst.ProcessName, "start").Start()
4747
}
4848

49-
// 删除服务
49+
// Uninstall 删除服务
5050
func (this *ServiceManager) Uninstall() error {
5151
if os.Getgid() != 0 {
5252
return errors.New("only root users can uninstall the service")

internal/utils/service_others.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !linux,!windows
1+
//go:build !linux && !windows
22

33
package utils
44

internal/utils/service_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build windows
1+
//go:build windows
22

33
package utils
44

internal/web/actions/default/clusters/cluster/node/nodeutils/utils_ext.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 Liuxiangchao [email protected]. All rights reserved. Official site: https://goedge.cn .
22
//go:build !plus
3-
// +build !plus
43

54
package nodeutils
65

internal/web/actions/default/clusters/cluster/node/update_hook.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 Liuxiangchao [email protected]. All rights reserved.
22
//go:build !plus
3-
// +build !plus
43

54
package node
65

internal/web/actions/default/clusters/clusterutils/cluster_helper_ext.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 Liuxiangchao [email protected]. All rights reserved. Official site: https://goedge.cn .
22
//go:build !plus
3-
// +build !plus
43

54
package clusterutils
65

0 commit comments

Comments
 (0)