Browse Source

all: Unused errors

Jakob Borg 3 years ago
parent
commit
dde275c6cc
3 changed files with 2 additions and 2 deletions
  1. 2 0
      lib/connections/quic_unsupported.go
  2. 0 1
      lib/connections/service.go
  3. 0 1
      lib/model/model.go

+ 2 - 0
lib/connections/quic_unsupported.go

@@ -9,6 +9,8 @@
 
 package connections
 
+var errNotInBuild = fmt.Errorf("%w: disabled at build time", errUnsupported)
+
 func init() {
 	for _, scheme := range []string{"quic", "quic4", "quic6"} {
 		listeners[scheme] = invalidListener{err: errNotInBuild}

+ 0 - 1
lib/connections/service.go

@@ -56,7 +56,6 @@ var (
 	// These are specific explanations for errUnsupported.
 	errDisabled   = fmt.Errorf("%w: disabled by configuration", errUnsupported)
 	errDeprecated = fmt.Errorf("%w: deprecated", errUnsupported)
-	errNotInBuild = fmt.Errorf("%w: disabled at build time", errUnsupported)
 
 	// Various reasons to reject a connection
 	errNetworkNotAllowed      = errors.New("network not allowed")

+ 0 - 1
lib/model/model.go

@@ -198,7 +198,6 @@ var (
 	errEncryptionTokenWrite               = errors.New("failed to write encryption token")
 	errMissingRemoteInClusterConfig       = errors.New("remote device missing in cluster config")
 	errMissingLocalInClusterConfig        = errors.New("local device missing in cluster config")
-	errConnLimitReached                   = errors.New("connection limit reached")
 )
 
 // NewModel creates and starts a new model. The model starts in read-only mode,