Skip to content

Commit

Permalink
rename package in crud
Browse files Browse the repository at this point in the history
  • Loading branch information
subowei committed Oct 9, 2023
1 parent bccd974 commit 217dc03
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions cmd/commandline/kvTable.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commandline
import (
"fmt"

"github.com/FISCO-BCOS/go-sdk/precompiled/tableManager"
"github.com/FISCO-BCOS/go-sdk/precompiled/crud"
"github.com/spf13/cobra"
)

Expand All @@ -30,9 +30,9 @@ For more information please refer:
value := args[2]
var valueFields = []string{}
valueFields = append(valueFields, value)
tableManagerService, err := tableManager.NewTableManagerService(RPC)
tableManagerService, err := crud.NewTableManagerService(RPC)
if err != nil {
fmt.Printf("set failed, tableManager.NewTableManagerService err: %v\n", err)
fmt.Printf("set failed, crud.NewTableManagerService err: %v\n", err)
return
}
result, err := tableManagerService.CreateTable(tableName, key, valueFields)
Expand Down Expand Up @@ -72,13 +72,13 @@ For more information please refer:
value := args[2]
var valueFields = []string{}
valueFields = append(valueFields, value)
entry := tableManager.Entry{
entry := crud.Entry{
Key: key,
Fields: valueFields,
}
tableManagerService, err := tableManager.NewTableManagerService(RPC)
tableManagerService, err := crud.NewTableManagerService(RPC)
if err != nil {
fmt.Printf("set failed, tableManager.NewTableManagerService err: %v\n", err)
fmt.Printf("set failed, crud.NewTableManagerService err: %v\n", err)
return
}
result, err := tableManagerService.Insert(tableName, entry)
Expand Down Expand Up @@ -113,7 +113,7 @@ For more information please refer:
Run: func(cmd *cobra.Command, args []string) {
tableName := args[0]
key := args[1]
tableManagerService, err := tableManager.NewTableManagerService(RPC)
tableManagerService, err := crud.NewTableManagerService(RPC)
if err != nil {
fmt.Printf("get failed, consensus.NewConsensusService err: %v\n", err)
return
Expand Down
2 changes: 1 addition & 1 deletion precompiled/crud/KVTable.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion precompiled/crud/tableManager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 217dc03

Please sign in to comment.