Reformatting, make update

This commit is contained in:
Philipp Heckel 2022-09-27 12:37:02 -04:00
parent a9019131cf
commit 419bfecd6f
11 changed files with 289 additions and 263 deletions

View file

@ -11,14 +11,13 @@ import (
// CachingEmbedFS is a wrapper around embed.FS that allows setting a ModTime, so that the
// default static file server can send 304s back. It can be used like this:
//
// var (
// //go:embed docs
// docsStaticFs embed.FS
// docsStaticCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: docsStaticFs}
// )
//
// http.FileServer(http.FS(docsStaticCached)).ServeHTTP(w, r)
// var (
// //go:embed docs
// docsStaticFs embed.FS
// docsStaticCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: docsStaticFs}
// )
//
// http.FileServer(http.FS(docsStaticCached)).ServeHTTP(w, r)
type CachingEmbedFS struct {
ModTime time.Time
FS embed.FS

View file

@ -268,7 +268,8 @@ func MaybeMarshalJSON(v interface{}) string {
// Warning: Never use this function with the intent to run the resulting command.
//
// Example:
// []string{"ls", "-al", "Document Folder"} -> ls -al "Document Folder"
//
// []string{"ls", "-al", "Document Folder"} -> ls -al "Document Folder"
func QuoteCommand(command []string) string {
var quoted []string
for _, c := range command {