Unit Testing
https://blog.jetbrains.com/go/2022/11/22/comprehensive-guide-to-testing-in-go
How to do unit testing
Useful Commands
Examples
package main
import "strconv"
// If the number is divisible by 3, write "Foo" otherwise, the number
func Fooer(input int) string {
isfoo := (input % 3) == 0
if isfoo {
return "Foo"
}
return strconv.Itoa(input)
}Table Driven testing
Errors and Logs
Running Parallel Tests
Skipping Tests
Last updated