"Fossies" - the Fresh Open Source Software Archive

Member "gdrive-2.1.1/drive/drive.go" (28 May 2021, 273 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 package drive
    2 
    3 import (
    4     "google.golang.org/api/drive/v3"
    5     "net/http"
    6 )
    7 
    8 type Drive struct {
    9     service *drive.Service
   10 }
   11 
   12 func New(client *http.Client) (*Drive, error) {
   13     service, err := drive.New(client)
   14     if err != nil {
   15         return nil, err
   16     }
   17 
   18     return &Drive{service}, nil
   19 }