...

Package utils

import "github.com/SpectraLogic/ds3_go_sdk/samples/utils"
Overview
Index

Overview ▾

Constants

const BucketName = "GoPutBulkBucket"
const ResourceFolder = "./samples/resources/"

Variables

var BookNames = []string{"beowulf.txt", "sherlock_holmes.txt", "tale_of_two_cities.txt", "ulysses.txt"}

func LoadBook

func LoadBook(book string) (models.ReaderWithSizeDecorator, error)

Loads a book from resources folder.

func ToSafeString

func ToSafeString(str *string) string

Converts a string pointer into a string. If null, returns empty. Used to print string pointers.

func VerifyBookContent

func VerifyBookContent(bookName string, content io.ReadCloser) error

Verifies the content of a ReadCloser matches the content of the specified book.