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: add cppType and cppTypeWithPackage #165

Merged
merged 2 commits into from
Sep 1, 2020
Merged

feat: add cppType and cppTypeWithPackage #165

merged 2 commits into from
Sep 1, 2020

Conversation

amalone-scwx
Copy link
Contributor

This adds helpers for generating C++ types. The primitive types map to those defined in stdint.h. The others map to std::vector and std::string.

Usage example:

{{- range .File.MessageType}}
struct {{ .Name}} {
  {{- range $f := .Field }}
  	{{ $f | cppType "" }} {{ .Name | snakeCase}};
  {{- end}}
};
{{ end }}

@amalone-scwx amalone-scwx requested a review from moul as a code owner August 27, 2020 15:54
@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Aug 27, 2020
@amalone-scwx
Copy link
Contributor Author

Looks like a CI issue ?

[2020-08-27 15:55:35] [build] /bin/sh: 3: golangci-lint: not found
[2020-08-27 15:55:35] [build] make: *** [rules.mk:112: go.lint] Error 127
[2020-08-27 15:55:35] [build] 2020/08/27 15:55:35 Running /usr/bin/make failed, continuing anyway: exit status 2
[2020-08-27 15:55:35] [build] 2020/08/27 15:55:35 Skipping dependency installation because a Go vendor directory was found.
[2020-08-27 15:55:35] [build] 2020/08/27 15:55:35 Running extractor command '/opt/dist/language-packs/go/tools/platform/linux/bin/go-extractor -mod=vendor ./...' from directory '/opt/src'.
[2020-08-27 15:55:35] [build] 2020/08/27 15:55:35 go [-e -json -compiled=true -test=false -export=false -deps=true -find=false -mod=vendor -- ./...]: exit status 1: go: inconsistent vendoring in /opt/src:

@moul moul changed the title helpers : add cppType and cppTypeWithPackage feat: add cppType and cppTypeWithPackage Sep 1, 2020
@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Sep 1, 2020
@moul moul self-assigned this Sep 1, 2020
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed ✅ Approved Pull Request has been approved and can be merged labels Sep 1, 2020
@moul moul merged commit c60433e into moul:master Sep 1, 2020
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Sep 1, 2020
@github-actions
Copy link

github-actions bot commented Sep 1, 2020

🎉 This PR is included in version 1.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ Merged Pull Request has been merged successfully released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants