Carlana

Results 153 comments of Carlana

There’s a typo in the first example but otherwise I would permit all three.

I have one of these in https://github.com/carlmjohnson/syncx. I think it’s suitable for the standard library, but it should probably come as part of a std wide addition of generics, not...

FWIW, I wrote the closure version and find it much more ergonomic. It wouldn't occur to me to write ``` func GetFoo() (*Foo, error) { return OnceFunc(getFoo) } ``` since...

Also I don't think it makes sense for this to return an error for the reasons given here: https://github.com/golang/go/issues/53696#issuecomment-1176238913 > I also had a situation when I wanted to make...

I prefer icholy's suggestion of one type with two methods to two types.

When I wanted the equivalent of ServeFSFile, I [bodged it together](https://github.com/carlmjohnson/rootdown/blob/91a3eedd33f1/router.go#L105-L120) by converting the fs.FS to an http.FileSystem with http.FS, and then calling http.ServeContent with the resulting http.File objects. It...

Based on the name, I would expect http.ServeFS to be the equivalent of http.FileServer(http.FS(fsys)). ServeFSFile is a bit clearer.

Your version of Hugo is too old. t.UnixMilli() was added in Go 1.17, and your version of Hugo is from before then.

@mukhtharcm ask in the support section of the Hugo Discourse forum. This is a place for tracking progress on implementing fixes, not supporting individual users.

My proposal for this feature is that it should be three features: - Define a format for content files in JSON. Eg you’d have sources/myfile.json with a new line delimited...