Source file src/net/http/omithttp2.go

     1  // Copyright 2019 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build nethttpomithttp2
     6  
     7  package http
     8  
     9  func init() {
    10  	omitBundledHTTP2 = true
    11  }
    12  
    13  const noHTTP2 = "no bundled HTTP/2" // should never see this
    14  
    15  func (s *Server) configureHTTP2()                       {}
    16  func (t *Transport) configureHTTP2(protocols Protocols) {}
    17  
    18  type http2Server struct{}
    19  
    20  type http2RoundTripper struct{}
    21  
    22  func (http2RoundTripper) RoundTrip(*Request) (*Response, error) { panic(noHTTP2) }
    23  

View as plain text