Skip to main content


A vendor-neutral storage library for Golang.


Write once, run on every storage service.


  • Production ready
  • High performance
  • Vendor agnostic

Quick Start#

package main
import (    "log"
    ""    ""
    // Add s3 support    _ "")
func main() {    // Init a Storager from connection string.     store, err := services.NewStoragerFromString("s3://bucket_name/path/to/workdir")    if err != nil {        log.Fatalf("service init failed: %v", err)    }
    // Write data from io.Reader into hello.txt    n, err := store.Write("hello.txt", r, length)
    // Read data from hello.txt to io.Writer    n, err := store.Read("hello.txt", w)
    // Stat hello.txt to check existence or get its metadata    o, err := store.Stat("hello.txt")
    // Use object's functions to get metadata    length, ok := o.GetContentLength()
    // List will create an iterator of object under path.    it, err := store.List("path")
    for {        // Use iterator.Next to retrieve next object until we meet IteratorDone.        o, err := it.Next()        if errors.Is(err, types.IteraoorDone) {            break        }    }
    // Delete hello.txt    err = store.Delete("hello.txt")}


All examples are maintained in