func ChoiceCompletePartOption(options []Option) []Option {
	var outOption []Option
	listener, _ := findOption(options, progressListener, nil)
	if listener != nil {
		outOption = append(outOption, Progress(listener.(ProgressListener)))
	}
	payer, _ := findOption(options, HTTPHeaderOssRequester, nil)
	if payer != nil {
		outOption = append(outOption, RequestPayer(PayerType(payer.(string))))
	}
	acl, _ := findOption(options, HTTPHeaderOssObjectACL, nil)
	if acl != nil {
		outOption = append(outOption, ObjectACL(ACLType(acl.(string))))
	}
	callback, _ := findOption(options, HTTPHeaderOssCallback, nil)
	if callback != nil {
		outOption = append(outOption, Callback(callback.(string)))
	}
	callbackVar, _ := findOption(options, HTTPHeaderOssCallbackVar, nil)
	if callbackVar != nil {
		outOption = append(outOption, CallbackVar(callbackVar.(string)))
	}
	respHeader, _ := findOption(options, responseHeader, nil)
	if respHeader != nil {
		outOption = append(outOption, GetResponseHeader(respHeader.(*http.Header)))
	}
	return outOption
}
ChoiceCompletePartOption choices valid option supported by CompleteMulitiPart
package oss
import (
	"bytes"
	"errors"
	"fmt"
	"hash/crc32"
	"hash/crc64"
	"net/http"
	"os"
	"os/exec"
	"runtime"
	"strconv"
	"strings"
	"time"
)
func userAgent() string {
	sys := getSysInfo()
	return fmt.Sprintf("aliyun-sdk-go/%s (%s/%s/%s;%s)", Version, sys.name,
		sys.release, sys.machine, runtime.Version())
}
type sysInfo struct {
	name    string  
	release string  
	machine string  
}
func getSysInfo() sysInfo {
	name := runtime.GOOS
	release := "-"
	machine := runtime.GOARCH
	if out, err := exec.Command("uname", "-s").CombinedOutput(); err == nil {
		name = string(bytes.TrimSpace(out))
	}
	if out, err := exec.Command("uname", "-r").CombinedOutput(); err == nil {
		release = string(bytes.TrimSpace(out))
	}
	if out, err := exec.Command("uname", "-m").CombinedOutput(); err == nil {
		machine = string(bytes.TrimSpace(out))
	}
	return sysInfo{name: name, release: release, machine: machine}
}
type unpackedRange struct {
	hasStart bool   
	hasEnd   bool   
	start    int64  
	end      int64  
}
func invalidRangeError(r string) error {
	return fmt.Errorf("InvalidRange %s", r)
}
func parseRange(normalizedRange string) (*unpackedRange, error) {
	var err error
	hasStart := false
	hasEnd := false
	var start int64
	var end int64
	nrSlice := strings.Split(normalizedRange, "=")
	if len(nrSlice) != 2 || nrSlice[0] != "bytes" {
		return nil, invalidRangeError(normalizedRange)
	}
	rSlice := strings.Split(nrSlice[1], ",")
	rStr := rSlice[0]
	if strings.HasSuffix(rStr, "-") {  
		startStr := rStr[:len(rStr)-1]
		start, err = strconv.ParseInt(startStr, 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		hasStart = true
	} else if strings.HasPrefix(rStr, "-") {  
		len := rStr[1:]
		end, err = strconv.ParseInt(len, 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		if end == 0 {  
			return nil, invalidRangeError(normalizedRange)
		}
		hasEnd = true
	} else {  
		valSlice := strings.Split(rStr, "-")
		if len(valSlice) != 2 {
			return nil, invalidRangeError(normalizedRange)
		}
		start, err = strconv.ParseInt(valSlice[0], 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		hasStart = true
		end, err = strconv.ParseInt(valSlice[1], 10, 64)
		if err != nil {
			return nil, invalidRangeError(normalizedRange)
		}
		hasEnd = true
	}
	return &unpackedRange{hasStart, hasEnd, start, end}, nil
}
func adjustRange(ur *unpackedRange, size int64) (start, end int64) {
	if ur == nil {
		return 0, size
	}
	if ur.hasStart && ur.hasEnd {
		start = ur.start
		end = ur.end + 1
		if ur.start < 0 || ur.start >= size || ur.end > size || ur.start > ur.end {
			start = 0
			end = size
		}
	} else if ur.hasStart {
		start = ur.start
		end = size
		if ur.start < 0 || ur.start >= size {
			start = 0
		}
	} else if ur.hasEnd {
		start = size - ur.end
		end = size
		if ur.end < 0 || ur.end > size {
			start = 0
			end = size
		}
	}
	return
}
func GetNowSec() int64 {
	return time.Now().Unix()
}
func GetNowNanoSec() int64 {
	return time.Now().UnixNano()
}
func GetNowGMT() string {
	return time.Now().UTC().Format(http.TimeFormat)
}
type FileChunk struct {
	Number int    
	Offset int64  
	Size   int64  
}
func SplitFileByPartNum(fileName string, chunkNum int) ([]FileChunk, error) {
	if chunkNum <= 0 || chunkNum > 10000 {
		return nil, errors.New("chunkNum invalid")
	}
	file, err := os.Open(fileName)
	if err != nil {
		return nil, err
	}
	defer file.Close()
	stat, err := file.Stat()
	if err != nil {
		return nil, err
	}
	if int64(chunkNum) > stat.Size() {
		return nil, errors.New("oss: chunkNum invalid")
	}
	var chunks []FileChunk
	var chunk = FileChunk{}
	var chunkN = (int64)(chunkNum)
	for i := int64(0); i < chunkN; i++ {
		chunk.Number = int(i + 1)
		chunk.Offset = i * (stat.Size() / chunkN)
		if i == chunkN-1 {
			chunk.Size = stat.Size()/chunkN + stat.Size()%chunkN
		} else {
			chunk.Size = stat.Size() / chunkN
		}
		chunks = append(chunks, chunk)
	}
	return chunks, nil
}
func SplitFileByPartSize(fileName string, chunkSize int64) ([]FileChunk, error) {
	if chunkSize <= 0 {
		return nil, errors.New("chunkSize invalid")
	}
	file, err := os.Open(fileName)
	if err != nil {
		return nil, err
	}
	defer file.Close()
	stat, err := file.Stat()
	if err != nil {
		return nil, err
	}
	var chunkN = stat.Size() / chunkSize
	if chunkN >= 10000 {
		return nil, errors.New("Too many parts, please increase part size")
	}
	var chunks []FileChunk
	var chunk = FileChunk{}
	for i := int64(0); i < chunkN; i++ {
		chunk.Number = int(i + 1)
		chunk.Offset = i * chunkSize
		chunk.Size = chunkSize
		chunks = append(chunks, chunk)
	}
	if stat.Size()%chunkSize > 0 {
		chunk.Number = len(chunks) + 1
		chunk.Offset = int64(len(chunks)) * chunkSize
		chunk.Size = stat.Size() % chunkSize
		chunks = append(chunks, chunk)
	}
	return chunks, nil
}
func GetPartEnd(begin int64, total int64, per int64) int64 {
	if begin+per > total {
		return total - 1
	}
	return begin + per - 1
}
var crcTable = func() *crc64.Table {
	return crc64.MakeTable(crc64.ECMA)
}
var crc32Table = func() *crc32.Table {
	return crc32.MakeTable(crc32.IEEE)
}
func ChoiceTransferPartOption(options []Option) []Option {
	var outOption []Option
	listener, _ := findOption(options, progressListener, nil)
	if listener != nil {
		outOption = append(outOption, Progress(listener.(ProgressListener)))
	}
	payer, _ := findOption(options, HTTPHeaderOssRequester, nil)
	if payer != nil {
		outOption = append(outOption, RequestPayer(PayerType(payer.(string))))
	}
	versionId, _ := findOption(options, "versionId", nil)
	if versionId != nil {
		outOption = append(outOption, VersionId(versionId.(string)))
	}
	trafficLimit, _ := findOption(options, HTTPHeaderOssTrafficLimit, nil)
	if trafficLimit != nil {
		speed, _ := strconv.ParseInt(trafficLimit.(string), 10, 64)
		outOption = append(outOption, TrafficLimitHeader(speed))
	}
	respHeader, _ := findOption(options, responseHeader, nil)
	if respHeader != nil {
		outOption = append(outOption, GetResponseHeader(respHeader.(*http.Header)))
	}
	return outOption
}