https://github.com/codeskyblue/httpfs
Go Library for open http file like local file
https://github.com/codeskyblue/httpfs
Last synced: about 1 month ago
JSON representation
Go Library for open http file like local file
- Host: GitHub
- URL: https://github.com/codeskyblue/httpfs
- Owner: codeskyblue
- License: mit
- Created: 2017-02-23T07:36:28.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-23T08:09:16.000Z (about 8 years ago)
- Last Synced: 2024-10-14T20:51:41.660Z (7 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# httpfs
[](https://godoc.org/github.com/codeskyblue/httpfs)Golang library for open http file like open local file
## Example
Usage in unzip http file```go
package mainimport (
"github.com/codeskyblue/httpfs"
"archive/zip"
"fmt"
"log"
)func main(){
file, err := Open("http://some-host/file.zip")
if err != nil {
log.Fatal(err)
}
zrd, err := zip.NewReader(file, file.Size())
if err != nil {
log.Fatal(err)
}
for _, f := range zrd.File {
fmt.Printf("F-Name: %s\n", f.Name)
}
}
```## LICENSE
[MIT](LICENSE)