Skip to content

mashiike/urlio

Repository files navigation

urlio

ci Documentation Go Report Card

package urlio aims to provide io.Reader/io.Writer for resources corresponding to URLs. builtin support schemes

  • s3
  • gs
  • file
  • http
  • https

Note: As of v0.0.0, it is still a Reader only implementation.

Usage

see details in godoc

package main

import (
	"fmt"
	"io/ioutil"

	"github.com/mashiike/urlio"
)

func main() {
	reader, _ := urlio.NewReader("s3://example.com/example.txt")
	defer reader.Close()
	bytes, _ := ioutil.ReadAll(reader)
	fmt.Println(string(bytes))
}

LICENSE

MIT