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

add an optional expression which can be used to default a slice length #149

Merged
merged 1 commit into from May 25, 2023

Conversation

jstrachan
Copy link

you can add a configuration in the yaml file for the expression to use:

TRANSLATOR:
  LenFields:
    MyStruct.some_data: some_size

which will then generate the go code to set the Len of the slice in the Deref() function

you can add a configuration in the yaml file for the expression to use:

```yaml
TRANSLATOR:
  LenFields:
    MyStruct.some_data: some_size
```
@xlab
Copy link
Owner

xlab commented May 25, 2023

Awesome idea, thanks!

@xlab xlab merged commit 591bf68 into xlab:master May 25, 2023
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.

None yet

2 participants