コード例 #1
0
ファイル: s3i_test.go プロジェクト: dutchcoders/goamz
func testBucket(s *s3.S3) *s3.Bucket {
	// Watch out! If this function is corrupted and made to match with something
	// people own, killBucket will happily remove *everything* inside the bucket.
	key := s.Auth.AccessKey
	if len(key) >= 8 {
		key = s.Auth.AccessKey[:8]
	}
	return s.Bucket(fmt.Sprintf("goamz-%s-%s", s.Region.Name, key))
}
コード例 #2
0
ファイル: s3.go プロジェクト: wangmingjob/goyangi
// Bucket get bucket of S3 via bucket name.
func Bucket(connection *s3.S3, bucketName string) *s3.Bucket {
	return connection.Bucket(bucketName)
}