"Fossies" - the Fresh Open Source Software Archive

Member "gdrive-2.1.1/vendor/golang.org/x/oauth2/client_appengine.go" (28 May 2021, 530 Bytes) of package /linux/misc/gdrive-2.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Go source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // Copyright 2014 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 // +build appengine
    6 
    7 // App Engine hooks.
    8 
    9 package oauth2
   10 
   11 import (
   12     "net/http"
   13 
   14     "golang.org/x/net/context"
   15     "golang.org/x/oauth2/internal"
   16     "google.golang.org/appengine/urlfetch"
   17 )
   18 
   19 func init() {
   20     internal.RegisterContextClientFunc(contextClientAppEngine)
   21 }
   22 
   23 func contextClientAppEngine(ctx context.Context) (*http.Client, error) {
   24     return urlfetch.Client(ctx), nil
   25 }