network/download: refactor network code
This is a stab at refactoring the code. This should in practice be more testable as the client as passed along through the code.
Could probably write up some test if we want to.
TODO:
- CI fixup
- Some validation functions should be moved from
stboot.go
, but havent found a good home yet.
Fixes #108 (closed)
Signed-off-by: Morten Linderud morten.linderud@glasklarteknik.se