Dmitri Shuralyov

Results 869 comments of Dmitri Shuralyov

If the output is already `gofmt`ed, running `format.Source` on it is a no-op.

Can you please expand a bit on the motivation? What would you do differently if this were implemented? Is this a feature request to be able to defer the cost...

The best practice recommends avoiding global variables when it is possible and when it makes sense. It doesn't seem very applicable in this situation. To answer your question, let me...

Thanks for the report. For reference, the API of package `github.com/shurcooL/vfsgen` allows providing a custom name for the target file. See [`vfsgen.Options.Filename`](https://pkg.go.dev/github.com/shurcooL/vfsgen?#Options.Filename): ```Go // Filename of the generated Go code...

I've looked at the [source code](https://github.com/golang/tools/blob/2ee2e4c56a28ab4461523bb5ecc1785c3845e938/cmd/stringer/stringer.go#L161) of [`stringer`](https://pkg.go.dev/golang.org/x/tools/cmd/stringer), and it doesn't print anything on success. That's in line with Unix tools. Perhaps it's be better to rely on `-x` flag...

That limitation is tracked in issue #23 (also see #44). See that issue for information about workarounds.

> This is meant as a proof-of-concept, only. I did not want to spam the discussion in #36 with the diff. Acknowledged. Thanks. I think the code changes will be...

vfsgen can be used to embed arbitrary files, so yes, it's possible to include a sqlite database file. Note that the `http.FileSystem` interface implementation that vfsgen produces is a read-only...

Have you seen package [`github.com/shurcooL/httpfs/union`](https://godoc.org/github.com/shurcooL/httpfs/union)? For example, see it being used [here](https://github.com/shurcooL/issuesapp/blob/8e856ce22ad3d212ab906dd21c30e6bd25185b5c/assets/assets.go#L14-L18). You could do something like this: ```Go // Assets contains assets for some project. var Assets = union.New(map[string]http.FileSystem{...

Hi @veqryn, Thanks for the feature request. Fortunately, this is already possible to achieve without changes to `vfsgen`. `vfsgen` was designed to enable this kind of customization (and more) through...