Skip to content

V0 #4

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

Merged
merged 6 commits into from
Jul 19, 2024
Merged

V0 #4

merged 6 commits into from
Jul 19, 2024

Conversation

godcong
Copy link
Owner

@godcong godcong commented Jul 19, 2024

Closing issues
closes #3

godcong added 6 commits July 19, 2024 20:38
- Introduce golangci-lint workflow to enforce code quality.
- Add release workflow to automate the release process.
- Update README with new usage instructions and examples.
- Refactor code to improve structure and maintainability.
- Fix bugs and address technical debts.

BREAKING CHANGE: The change in the default value generation logic might
affect existing users who rely on the previous behavior.
Add functionality to generate default values for struct fields tagged with
'default'. This enhancement allows users to specify default values in their
struct definitions and have those values automatically populated when new instances of the struct are created. The `GenerateFromTags` function and associated templates (`load.go` and `template.go.tmpl`) have been updated to
handle the generation of default value functions based on the struct tags.
Add new functionalities to the 'io' package for reading Go files in a directory
and writing structured data to Go files with graph representations. This commit
also includes the addition of a new 'shell' package for executing shell commands,
and updates to template files for code generation.

The 'ReadDir' function now excludes '_test.go' and '_default.go' files from the
returned list of Go files in a directory. The 'WriteGraph' function generates
Go code from a provided graph structure, replacing '.go' file extensions with
'_default.go'.

The 'shell' package provides utilities for executing 'goimports' and 'go install'commands, ensuring required tools are available in the environment.

Additionally, embedded template strings have been introduced for code generation
templates, facilitating easier maintenance and modification of the code generation
process.
Add a basic .goreleaser.yml configuration for release management and build
automation. This includes settings for go mod tidy, go generate hooks, build
environments, flags, and ldflags. The configuration is tailored for the
project's specific needs, such as excluding certain linters for test files
and setting up custom archive formats and filenames.
- Rename cmd/root.go to cmd/main.go.- Update import paths and commands in main.go.
- Add new buildVersion function using goversion package.
- Refactor gen package to handle default values generation.- Implement new ParseFromTags function for struct tag parsing.
- Implement default value assignment for new fields in StructStruct and StructStd.
- Refactor struct default value initialization to use dl package for pointer handling.
- Update struct_default.go with comprehensive default value settings.
@godcong godcong merged commit d791a30 into main Jul 19, 2024
1 check failed
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.

Feature(dl): go standard type support.
1 participant