It was annoying me that fasta and fastq output to []byte and not an io.Writer. The io.Writer interface gives you access to a lot more - you can output over a websocket, to stdout, or to a file, without having to put the entire file into memory every time.
I would like to get comments on the error checking though - it is a little annoying, since every write technically can fail (like if the output location is cut off). I could just build everything into a huge Sprintf. The way I currently implement is naive and just uses a whole bunch of errs.
It was annoying me that fasta and fastq output to
[]byte
and not an io.Writer. The io.Writer interface gives you access to a lot more - you can output over a websocket, to stdout, or to a file, without having to put the entire file into memory every time.I would like to get comments on the error checking though - it is a little annoying, since every write technically can fail (like if the output location is cut off). I could just build everything into a huge Sprintf. The way I currently implement is naive and just uses a whole bunch of errs.