Skip to content

xpzouying/storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

storage

storage in go

Usage

Install

go get -u github.com/xpzouying/storage

Example

import "github.com/xpzouying/storage"

l, _ := storage.NewLocal("/tmp/oss")

buf := bytes.NewBuffer("hello storage")
l.Put(context.Background(), "file1", buf)


rc, _, := l.Get(context.Background(), "file1")
data, _ := ioutil.ReadAll(rc)
rc.Close()

log.Printf("read data: %s\n", data)

Test

go test -v github.com/xpzouying/storage

About

storage in go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages