func (v *valResumableDownload) getFileInf() error {
	srv, err := drive.New(v.Client)
	if err != nil {
		return err
	}
	fields := []googleapi.Field{"createdTime,id,md5Checksum,mimeType,modifiedTime,name,owners,parents,shared,size,webContentLink,webViewLink"}
	res, err := srv.Files.Get(v.ID).Fields(fields...).Do()
	if err != nil {
		return err
	}
	v.DownloadFile = res
	return nil
}
getFileInf : Retrieve file infomation using Drive API.
package main
import (
	"crypto/md5"
	"encoding/hex"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"path"
	"path/filepath"
	"regexp"
	"strconv"
	"strings"
	"time"
	drive "google.golang.org/api/drive/v3"
	"google.golang.org/api/googleapi"
	"google.golang.org/api/googleapi/transport"
)
type valResumableDownload struct {
	para
	dlParams
}
type dlParams struct {
	CurrentFileSize int64
	DownloadFile    *drive.File
	OutMimeType     string
	Range           string
	Start           int64
	End             int64
}
func (p *para) getFileInfFromP() (*drive.File, error) {
	v := &valResumableDownload{
		para: *p,
	}
	v.Client = &http.Client{
		Transport: &transport.APIKey{Key: p.APIKey},
	}
	if err := v.getFileInf(); err != nil {
		return nil, err
	}
	return v.DownloadFile, nil
}
func (p *para) showFileInf() error {
	dlfile, err := p.getFileInfFromP()
	if err != nil {
		return err
	}
	r, err := json.Marshal(dlfile)
	if err != nil {
		return err
	}
	fmt.Printf("%s\n", r)
	return nil
}
func getDownloadBytes(size string) (int64, error) {
	reg := regexp.MustCompile("^([0-9.]+)$|^([0-9.]+)([bkmgt])")
	regRes := reg.FindStringSubmatch(strings.ToLower(size))
	switch {
	case len(regRes) == 0:
		return 0, fmt.Errorf("wrong size: %s", size)
	case regRes[1] != "":
		s, err := strconv.ParseInt(regRes[1], 10, 64)
		if err != nil {
			return 0, err
		}
		return s, nil
	case regRes[2] != "" && regRes[3] != "":
		f, err := strconv.ParseFloat(regRes[2], 64)
		if err != nil {
			return 0, err
		}
		switch regRes[3] {
		case "k":
			f *= 1000
		case "m":
			f *= 1000000
		case "g":
			f *= 1000000000
		case "t":
			f *= 1000000000000
		}
		s := int64(f)
		if s < 10000000 {
			return 10000000, nil
		}
		return s, nil
	default:
		return 0, fmt.Errorf("unexpected error '%s'", size)
	}
}
func (v *valResumableDownload) resDownloadFileByAPIKey() (*http.Response, error) {
	u, err := url.Parse(driveAPI)
	if err != nil {
		return nil, err
	}
	u.Path = path.Join(u.Path, v.DownloadFile.Id)
	q := u.Query()
	q.Set("alt", "media")
	u.RawQuery = q.Encode()
	timeOut := func(size int64) int64 {
		if size == 0 {
			switch {
			case size < 100000000:
				return 3600
			case size > 100000000:
				return 0
			}
		}
		return 0
	}(v.DownloadFile.Size)
	v.Client.Timeout = time.Duration(timeOut) * time.Second
	req, err := http.NewRequest("get", u.String(), nil)
	if err != nil {
		return nil, err
	}
	req.Header.Set("Range", v.Range)
	res, err := v.Client.Do(req)
	if err != nil {
		return nil, err
	}
	if res.StatusCode != 206 && res.StatusCode != 200 {
		r, err := ioutil.ReadAll(res.Body)
		if err != nil {
			return nil, err
		}
		defer res.Body.Close()
		return nil, fmt.Errorf("%s", r)
	}
	return res, nil
}