Skip to content

codeskyblue/httpfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpfs

GoDoc

Golang library for open http file like open local file

Example

Usage in unzip http file

package main

import (
    "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

About

Go Library for open http file like local file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages