all: check the filepath.Walk error parameter
As documented by filepath.WalkFunc:
The err argument reports an error related to path, signaling that
Walk will not walk into that directory. The function can decide how
to handle that error; as described earlier, returning the error will
cause Walk to stop walking the entire tree.
We want the conservative behavior which is also used in all examples:
to stop if any error is encountered. Do that.
This removes four warnings from staticcheck, which correctly pointed out
that the value of the "err" parameter was being overwritten before being used.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie1bce1f5f6e820c9bb203226211ad9a9ec113eba
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/537224
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>