github.com/jgbaldwinbrown/perf@v0.1.1/analysis/app/local.go (about)

     1  // Copyright 2017 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 !appengine
     6  // +build !appengine
     7  
     8  package app
     9  
    10  import (
    11  	"log"
    12  	"net/http"
    13  
    14  	"golang.org/x/net/context"
    15  )
    16  
    17  // requestContext returns the Context object for a given request.
    18  func requestContext(r *http.Request) context.Context {
    19  	return r.Context()
    20  }
    21  
    22  func infof(_ context.Context, format string, args ...interface{}) {
    23  	log.Printf(format, args...)
    24  }
    25  
    26  var errorf = infof