Update walk.go

Moved walkFn to WalkState