Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Move main logic to /generator and Refactor it #111

Merged
merged 9 commits into from Nov 22, 2021
Merged

Conversation

tsuzu
Copy link
Collaborator

@tsuzu tsuzu commented Nov 22, 2021

generator部分の実装は適宜structに分割しつつ generator/ 以下、その他ユーティリティは pkg/ 以下におきました

debug.ReadBuildInfo() でバージョン読む実装もついでに追加しました

},
"UpdateFunc": func() string {
return fmt.Sprintf("Update(ctx context.Context, subject *%s) (err error)", g.StructNameRef)
return fmt.Sprintf("Update(ctx context.Context, subject *%s) (err error)", g.param.StructNameRef)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

本当はここら辺はtemplateで完結できるようにしたい

Copy link
Member

Choose a reason for hiding this comment

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

わかる

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

まぁFuture Work

@tsuzu
Copy link
Collaborator Author

tsuzu commented Nov 22, 2021

os.WriteFileがなくて落ちている・・・Goのバージョンを上げます

@54m
Copy link
Member

54m commented Nov 22, 2021

ldflagsのここが漏れ

- -X github.com/go-generalize/firestore-repo/main.AppVersion={{ .Version }}

@tsuzu tsuzu marked this pull request as ready for review November 22, 2021 09:29
@tsuzu tsuzu requested a review from 54m November 22, 2021 09:30
@tsuzu tsuzu changed the title Move main logic to generator and Refactor Move main logic to /generator and Refactor Nov 22, 2021
@tsuzu tsuzu changed the title Move main logic to /generator and Refactor Move main logic to /generator and Refactor it Nov 22, 2021
cmd/firestore-repo/main.go Outdated Show resolved Hide resolved
Co-authored-by: 54m <30588003+54m@users.noreply.github.com>
@tsuzu tsuzu requested a review from 54m November 22, 2021 09:56
Copy link
Member

@54m 54m left a comment

Choose a reason for hiding this comment

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

LGTM

@54m 54m merged commit 0e4b9ef into master Nov 22, 2021
@54m 54m deleted the tsuzu/move-to-sub-packages branch November 22, 2021 09:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants