Conversation
| Taints: []string{}, | ||
| } | ||
|
|
||
| if size, err := strconv.ParseUint(parts[1], 10, 64); err == nil { |
There was a problem hiding this comment.
Is it expected that the parsing might fail? If not, we should just abort here and return the error then silentely ignoring it.
There was a problem hiding this comment.
Is it expected that the parsing might fail?
Yes, I think it's possible. Checking the error could also prevent from spec changes. (too low possibility, but still would be better than not checking instead.)
There was a problem hiding this comment.
yeah but I don't like that we silentely ignore the error here. Why not return an error if err != nil?
There was a problem hiding this comment.
There was a problem hiding this comment.
@SuperQ wdyt? But yeah I think returning an error would be better
There was a problem hiding this comment.
Yes, returning the error would be better.
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
| Taints: []string{}, | ||
| } | ||
|
|
||
| if size, err := strconv.ParseUint(parts[1], 10, 64); err == nil { |
There was a problem hiding this comment.
Yes, returning the error would be better.
|
@Dentrax Just a nit, but can you add |
Signed-off-by: Furkan furkan.turkal@trendyol.com
I have some use-cases for this implementation:
/proc/interruptsfile using procfs package (with go:linkname)All tests passes.
Fixes #478