with_appengine.go 704 B

12345678910111213141516171819202122232425
  1. // Copyright 2017 The go-github AUTHORS. All rights reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style
  4. // license that can be found in the LICENSE file.
  5. // +build appengine
  6. // This file provides glue for making github work on App Engine.
  7. // In order to get the entire github package to compile with
  8. // Go 1.6, you will need to rewrite all the import "context" lines.
  9. // Fortunately, this is easy with "gofmt":
  10. //
  11. // gofmt -w -r '"context" -> "golang.org/x/net/context"' *.go
  12. package github
  13. import (
  14. "context"
  15. "net/http"
  16. )
  17. func withContext(ctx context.Context, req *http.Request) *http.Request {
  18. // No-op because App Engine adds context to a request differently.
  19. return req
  20. }