use forbidigo for net/rpc

Signed-off-by: FFMMM <FFMMM@users.noreply.github.com>
add-linter-net-rpc-2-test
FFMMM 3 years ago
parent 864dd5ac4b
commit d2f8607f16
No known key found for this signature in database
GPG Key ID: 21CC0F2B42CEA01D

@ -64,6 +64,7 @@ linters-settings:
forbid:
- '\brequire\.New\b(# Use package-level functions with explicit TestingT)?'
- '\bassert\.New\b(# Use package-level functions with explicit TestingT)?'
- '\"net\/rpc\"(# Use github.com/hashicorp/consul-net-rpc/net/rpc for net/rpc needs)?'
# Exclude godoc examples from forbidigo checks.
# Default: true
exclude_godoc_examples: false
@ -71,11 +72,6 @@ linters-settings:
blocked:
# List of blocked modules.
modules:
# Blocked module.
- net/rpc:
# Recommended modules that should be used instead. (Optional)
recommendations:
- github.com/hashicorp/consul-net-rpc/net/rpc
- github.com/hashicorp/net-rpc-msgpackrpc:
recommendations:
- github.com/hashicorp/consul-net-rpc/net-rpc-msgpackrpc

@ -4,8 +4,8 @@ import (
"fmt"
"io/ioutil"
"log"
"os"
netrpc "net/rpc"
"os"
"github.com/hashicorp/go-msgpack/codec"
msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc"

Loading…
Cancel
Save