mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-11-26 10:23:45 +01:00
Run go fmt
This commit is contained in:
parent
4a694c0eb7
commit
3b101e802d
2
fs.go
2
fs.go
@ -18,7 +18,7 @@ import (
|
||||
//
|
||||
// To use the operating system's file system implementation, use os.DirFS:
|
||||
//
|
||||
// gemini.FileServer(os.DirFS("/tmp"))
|
||||
// gemini.FileServer(os.DirFS("/tmp"))
|
||||
func FileServer(fsys fs.FS) Handler {
|
||||
return fileServer{fsys}
|
||||
}
|
||||
|
29
tofu/tofu.go
29
tofu/tofu.go
@ -102,21 +102,20 @@ func (k *KnownHosts) Load(path string) error {
|
||||
// For more control over errors encountered during parsing, use bufio.Scanner
|
||||
// in combination with ParseHost. For example:
|
||||
//
|
||||
// var knownHosts tofu.KnownHosts
|
||||
// scanner := bufio.NewScanner(r)
|
||||
// for scanner.Scan() {
|
||||
// host, err := tofu.ParseHost(scanner.Bytes())
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// } else {
|
||||
// knownHosts.Add(host)
|
||||
// }
|
||||
// }
|
||||
// err := scanner.Err()
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// }
|
||||
//
|
||||
// var knownHosts tofu.KnownHosts
|
||||
// scanner := bufio.NewScanner(r)
|
||||
// for scanner.Scan() {
|
||||
// host, err := tofu.ParseHost(scanner.Bytes())
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// } else {
|
||||
// knownHosts.Add(host)
|
||||
// }
|
||||
// }
|
||||
// err := scanner.Err()
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// }
|
||||
func (k *KnownHosts) Parse(r io.Reader) error {
|
||||
k.mu.Lock()
|
||||
defer k.mu.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user