https://github.com/karpeleslab/openuri
Golang library to open various kind of urls
https://github.com/karpeleslab/openuri
Last synced: 12 months ago
JSON representation
Golang library to open various kind of urls
- Host: GitHub
- URL: https://github.com/karpeleslab/openuri
- Owner: KarpelesLab
- License: mit
- Created: 2023-05-23T12:39:12.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-23T12:46:28.000Z (about 3 years ago)
- Last Synced: 2025-02-14T21:04:05.806Z (over 1 year ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://godoc.org/github.com/KarpelesLab/openuri)
# openuri
This is a library that enables opening files and urls transparently.
It supports:
* Direct file access (no protocol)
* `file://` protocol
* `http://` and `https://` trought `net/http`
* `data:` uri
* Custom protocols
## Usage
f, err := openuri.Open(fn)
if err != nil {
return err
}
defer f.Close()
...