1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-07 21:37:04 +09:00

fix error in lint

This commit is contained in:
Kirill Shklyaev 2024-12-13 15:44:20 +03:00
parent ffd8601fc9
commit 4100d9a3dc
2 changed files with 12 additions and 7 deletions

View file

@ -34,7 +34,6 @@ func NewResults(networkMode string) internal.PerfResult {
}
}
func main() {
prep := NewInput()
err := internal.Prepare(prep, nil)
@ -89,13 +88,13 @@ func iterate(prep *input, result internal.PerfResult) error {
return err
}
var walletStr []byte
var cmd *exec.Cmd
if runtime.GOOS == "windows" {
walletStr, err = exec.Command("powershell", "-Command", internal.GrpcWalletCreate(workspace)).Output()
cmd = exec.Command("powershell", "-Command", internal.GrpcWalletCreate(workspace))
} else {
walletStr, err = exec.Command("bash", "-c", internal.GrpcWalletCreate(workspace)).Output()
cmd = exec.Command("bash", "-c", internal.GrpcWalletCreate(workspace))
}
walletStr, err := cmd.Output()
if err != nil {
return err
}

View file

@ -176,7 +176,10 @@ func GrpcWorkspaceCreate() string {
func GrpcAccountSelect(accHash, workspace, networkMode, staging string) string {
if runtime.GOOS == "windows" {
staging, _ = WinFixPath(staging)
staging, err := WinFixPath(staging)
if err != nil {
return "Error: " + err.Error()
}
return `cmd.exe /c 'grpcurl -import-path ../anytype-heart/ -proto pb/protos/service/service.proto -plaintext -d "{\"id\":\"` + accHash + `\",\"rootPath\":\"` + workspace + `\",\"disableLocalNetworkSync\":false,\"networkMode\":` + networkMode + `,\"networkCustomConfigFilePath\":\"` + staging + `\"}" localhost:31007 anytype.ClientCommands.AccountSelect'`
}
return `grpcurl -import-path ../anytype-heart/ -proto pb/protos/service/service.proto -plaintext -d '{
@ -218,7 +221,10 @@ func GrpcWalletCreate(workspace string) string {
func GrpcAccountCreate(workspace, networkMode, staging string) string {
if runtime.GOOS == "windows" {
staging, _ = WinFixPath(staging)
staging, err := WinFixPath(staging)
if err != nil {
return "Error: " + err.Error()
}
return `cmd.exe /c 'grpcurl -import-path ../anytype-heart/ -proto pb/protos/service/service.proto -plaintext -d "{\"icon\":13,\"networkMode\":` + networkMode + `,\"storePath\":\"` + workspace + `\",\"networkCustomConfigFilePath\":\"` + staging + `\"}" localhost:31007 anytype.ClientCommands.AccountCreate'`
}
return `grpcurl -import-path ../anytype-heart/ -proto pb/protos/service/service.proto -plaintext -d '{