You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is particularly for the Go template, since it currently assumes that all files are part of a main package. In most cases, the parent folder of the file has the same name as the package for its containing files. With a %PARENT% variable, the line in the Go template could be changed from
package main
to
package %PARENT%
which will be correct more often.
As a side note, I'm proposing the name %PARENT% instead of something like %FOLDER% since the latter could be understood to expand to the absolute path of the containing folder.
The text was updated successfully, but these errors were encountered:
@Shadow53 I guess it wouldn't hurt to have %PARENT% added, maybe with a more descriptive name like %PARENT_DIR_NAME% — but as you have discovered it's possible to add it anyway as an user variable so I won't be in a hurry to implement it myself. It's not difficult to add it, so for now I will leave it marked as “good first bug” so it can be picked by anyone willing to start contributing to the project 😉
This is particularly for the Go template, since it currently assumes that all files are part of a
main
package. In most cases, the parent folder of the file has the same name as the package for its containing files. With a%PARENT%
variable, the line in the Go template could be changed fromto
which will be correct more often.
As a side note, I'm proposing the name
%PARENT%
instead of something like%FOLDER%
since the latter could be understood to expand to the absolute path of the containing folder.The text was updated successfully, but these errors were encountered: