local-server/cmd/dkl-local-server/utils.go
2018-11-13 14:44:15 +11:00

19 lines
206 B
Go

package main
import (
"io"
"os"
)
func writeFile(out io.Writer, path string) error {
f, err := os.Open(path)
if err != nil {
return err
}
defer f.Close()
_, err = io.Copy(out, f)
return err
}