gofer 0.1.0

Gofer.rs makes it easy to fetch and read files from URLs.
Documentation

Gofer.rs

License Compatibility Package Documentation

Gofer.rs makes it easy to fetch and read files from URLs in Rust. Just call gofer::open(url)? to get back a Read!

✨ Features

  • Currently supports https:, http:, file:, and data: URLs.
  • Supports opting out of any feature using comprehensive feature flags.
  • Adheres to the Rust API Guidelines in its naming conventions.
  • 100% free and unencumbered public domain software.

🛠️ Prerequisites

⬇️ Installation

Installation via Cargo

cargo add gofer

Installation in Cargo.toml (with all features enabled)

[dependencies]
gofer = "0.1"

Installation in Cargo.toml (with only specific features enabled)

[dependencies]
gofer = { version = "0.1", default-features = false, features = ["https"] }

👉 Examples

Importing the library

use gofer::open;

Reading HTTP(S) URLs

gofer::open("https://www.google.com/robots.txt")?

Reading file: URLs

gofer::open("file://path/to/file.txt")?

Reading data: URLs

gofer::open("data:,A%20brief%20note")?

📚 Reference

https://docs.rs/gofer/

👨‍💻 Development

git clone https://github.com/dryrust/gofer.rs.git

Share on X Share on Reddit Share on Hacker News Share on Facebook Share on LinkedIn