Skip to content

Commit

Permalink
fix revive
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss committed Apr 29, 2024
1 parent a7f2c55 commit 5cb42e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions api/docgen/openrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func NewOpenRPCDocument(comments, permissions Comments) *go_openrpc_reflect.Docu
}

// remove the default implementation from the method descriptions
appReflector.FnGetMethodDescription = func(r reflect.Value, m reflect.Method, funcDecl *ast.FuncDecl) (string, error) {
appReflector.FnGetMethodDescription = func(_ reflect.Value, m reflect.Method, _ *ast.FuncDecl) (string, error) {
if v, ok := permissions[m.Name]; ok {
return "Auth level: " + v, nil
}
Expand All @@ -170,14 +170,14 @@ func NewOpenRPCDocument(comments, permissions Comments) *go_openrpc_reflect.Docu

appReflector.FnGetMethodName = func(
moduleName string,
r reflect.Value,
_ reflect.Value,
m reflect.Method,
funcDecl *ast.FuncDecl,
_ *ast.FuncDecl,
) (string, error) {
return moduleName + "." + m.Name, nil
}

appReflector.FnGetMethodSummary = func(r reflect.Value, m reflect.Method, funcDecl *ast.FuncDecl) (string, error) {
appReflector.FnGetMethodSummary = func(_ reflect.Value, m reflect.Method, _ *ast.FuncDecl) (string, error) {
if v, ok := comments[extractPackageNameFromAPIMethod(m)+m.Name]; ok {
return v, nil
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/cel-shed/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var p2pCmd = &cobra.Command{
var p2pNewKeyCmd = &cobra.Command{
Use: "new-key",
Short: "Generate and print new Ed25519 private key for p2p networking",
RunE: func(cmd *cobra.Command, _ []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
privkey, _, err := crypto.GenerateEd25519Key(rand.Reader)
if err != nil {
return err
Expand All @@ -42,7 +42,7 @@ var p2pNewKeyCmd = &cobra.Command{
var p2pPeerIDCmd = &cobra.Command{
Use: "peer-id",
Short: "Get peer-id out of public or private Ed25519 key",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
decKey, err := hex.DecodeString(args[0])
if err != nil {
return err
Expand Down

0 comments on commit 5cb42e7

Please sign in to comment.