Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update .gitignore with _ftl during Go init #793

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

worstell
Copy link
Contributor

fixes #776

@worstell worstell force-pushed the worstell/20240116-update-gitignore-during-init branch from 8412dbf to 2a1f339 Compare January 16, 2024 21:11
examples/**/go.work
examples/**/go.work.sum
**/_ftl
Copy link
Collaborator

@alecthomas alecthomas Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples/ are here in this repo, because we have scaffolding called the same _ftl

Actually let's keep this, and rename the folders in the template directories to _ftl.tmpl - the scaffolder should rename that correctly, but maybe just verify ftl build still works on a Go module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nice! updated and validated the build

@@ -143,3 +148,27 @@ var scaffoldFuncs = template.FuncMap{
return reflect.Indirect(reflect.ValueOf(v)).Type().Name()
},
}

func updateGitIgnore(ctx context.Context, dir string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a nice clean function Lizzy, nice!

@worstell worstell force-pushed the worstell/20240116-update-gitignore-during-init branch from 09dad6b to af0cbd8 Compare January 16, 2024 21:37
@worstell worstell merged commit cc826c1 into main Jan 16, 2024
@worstell worstell deleted the worstell/20240116-update-gitignore-during-init branch January 16, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ftl init should add appropriate lines to the repo .gitignore
2 participants