github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/go/vcweb/bzr.go (about)

     1  // Copyright 2022 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  package vcweb
     6  
     7  import (
     8  	"log"
     9  	"net/http"
    10  )
    11  
    12  type bzrHandler struct{}
    13  
    14  func (*bzrHandler) Available() bool { return true }
    15  
    16  func (*bzrHandler) Handler(dir string, env []string, logger *log.Logger) (http.Handler, error) {
    17  	return http.FileServer(http.Dir(dir)), nil
    18  }