Live data from Hacker News

if got, want: A Simple Way to Write Better Go Tests

mtlynch.io

1–5 of 5 posts

Re: if got, want: A Simple Way to Write Better Go Tests

#4
Hi so I'm developing a Go tool as a CS undergraduate sophomore. What are these tests and why are they important? Roughly speaking, the tool I'm creating downloads large files (~20GB) and manages it, how would I go about writing tests for that? And how would your tool help me? Thanks

Re: if got, want: A Simple Way to Write Better Go Tests

#5
post #4

Hi so I'm developing a Go tool as a CS undergraduate sophomore. What are these tests and why are they important? Roughly speaking, the tool I'm creating downloads large files (~20GB) and manages it, how would I go about writing tests for that? And how would your tool help me? Thanks

What I describe in the post isn't a particular tool, just a coding convention to follow in writing tests using Go's built-in testing tools.

It's hard to say how to test your app without more information, but here's a good primer on testing in Go:

https://www.calhoun.io/how-to-test-with-go/