remote

package module
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 19 Imported by: 0 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

remote

remote is a package for opening remote files easily.

Support remote source

HTTP
f, _ := remote.Open("http://example.com/file.txt")
defer f.Close()
GitHub
f, _, := remote.Open("github://k1LoW/tbls/README.md")
defer f.Close()
Amazon S3
f, _, := remote.Open("s3://my-bucket/path/to/file.txt")
defer f.Close()
Google Cloud Storage
f, _, := remote.Open("gs://my-bucket/path/to/file.txt")
defer f.Close()
f, _, := remote.Open("gcs://my-bucket/path/to/file.txt")
defer f.Close()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(raw string, opts ...Option) (io.ReadCloser, error)

Open remote file.

func ReadAll

func ReadAll(raw string) ([]byte, error)

ReadAll remote file.

Types

type Option

type Option func(*clientSet)

func GCSClient

func GCSClient(c *storage.Client) Option

GCSClient set storage.Client.

func GitHubClient

func GitHubClient(c *github.Client) Option

GitHubClient set github.Client.

func HTTPClient

func HTTPClient(c *http.Client) Option

HTTPClient set http.Client.

func S3Client

func S3Client(c s3iface.S3API) Option

S3Client set github.Client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL