-
Notifications
You must be signed in to change notification settings - Fork 2
Add IsComputed helper for field #139
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
Conversation
Could you please add tests? Could you also add more of a description to the PR? I'm struggling to figure out what this is for or how it would be useful. |
fa6ae09
to
a36a9bb
Compare
Added a better commit message and a test. The only real use case is so that I can use |
A helper function on the `Field` type so that unpacking a struct into a worsheet can avoid manipulating fields that should just be computed
a36a9bb
to
07c151a
Compare
computed_by_test.go
Outdated
|
||
"github.com/helloeave/dat/sqlx-runner" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestField_IsComputedBy(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this part of the Zuite
computed_by_test.go
Outdated
"github.com/helloeave/dat/sqlx-runner" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"math" | ||
"strings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like these are in the wrong spot now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬 Sorry, I should have just run goimports...
@pratikprasad you can't skip by specifying |
nvm @alexandrinaw explained to me that this is in the other conversion direction. let ws do its thing basically, chuck the struct's value. |
No description provided.