1 Star 0 Fork 0

爱薄荷的小虾米 / aws-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
integration.go 916 Bytes
一键复制 编辑 原始数据 按行查看 历史
lijunwei123 提交于 2015-06-16 13:16 . change package path
// Package integration performs initialization and validation for integration
// tests.
package integration
import (
"crypto/rand"
"fmt"
"io"
"os"
"github.com/ks3sdklib/aws-sdk-go/aws"
)
// Imported is a marker to ensure that this package's init() function gets
// executed.
//
// To use this package, import it and add:
//
// var _ = integration.Imported
const Imported = true
func init() {
if os.Getenv("DEBUG") != "" {
aws.DefaultConfig.LogLevel = 1
}
if os.Getenv("DEBUG_BODY") != "" {
aws.DefaultConfig.LogLevel = 1
aws.DefaultConfig.LogHTTPBody = true
}
if aws.DefaultConfig.Region == "" {
panic("AWS_REGION must be configured to run integration tests")
}
}
// UniqueID returns a unique UUID-like identifier for use in generating
// resources for integration tests.
func UniqueID() string {
uuid := make([]byte, 16)
io.ReadFull(rand.Reader, uuid)
return fmt.Sprintf("%x", uuid)
}
1
https://gitee.com/cqclife/aws-sdk-go.git
git@gitee.com:cqclife/aws-sdk-go.git
cqclife
aws-sdk-go
aws-sdk-go
v1.0.13

搜索帮助