29 lines · 410 B · Go
RawDownload
package main import (	"io/ioutil"	"net/http"	"os") func readfile(fs http.FileSystem, path string) ([]byte, error) {	f, err := fs.Open(path)	if err != nil {		return nil, err	} 	defer f.Close() 	return ioutil.ReadAll(f)} func readdir(fs http.FileSystem, path string) ([]os.FileInfo, error) {	f, err := fs.Open(path)	if err != nil {		return nil, err	} 	defer f.Close() 	return f.Readdir(-1)}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t