From d2f8607f1660e0bdf3f853ea6073eea58ce3544c Mon Sep 17 00:00:00 2001 From: FFMMM Date: Fri, 22 Apr 2022 17:55:33 -0700 Subject: [PATCH] use forbidigo for net/rpc Signed-off-by: FFMMM --- .golangci.yml | 6 +----- main.go | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 014129c7e1..45f0138093 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/main.go b/main.go index 297f8d67b0..1e696b086d 100644 --- a/main.go +++ b/main.go @@ -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"