quic_unsupported.go 597 B

12345678910111213141516171819
  1. // Copyright (C) 2020 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at http://mozilla.org/MPL/2.0/.
  6. //go:build noquic || !go1.15
  7. // +build noquic !go1.15
  8. package connections
  9. var errNotInBuild = fmt.Errorf("%w: disabled at build time", errUnsupported)
  10. func init() {
  11. for _, scheme := range []string{"quic", "quic4", "quic6"} {
  12. listeners[scheme] = invalidListener{err: errNotInBuild}
  13. dialers[scheme] = invalidDialer{err: errNotInBuild}
  14. }
  15. }