Test
Introduction
// main.go
package main
import (
"fmt"
"io"
)
func copySourceToDest(source io.Reader, dest io.Writer) error {
b, err := io.ReadAll(source)
if err != nil {
return err
}
_, err = dest.Write(b)
return err
}
func main() {
fmt.Println("Test")
}
How to run tests
1. Run test
2. Run test, more verbose
3. Run test by suppling the test files as argiments
4. Run test by specifying test
5. Run a test coverage
6. Run test by providing a package name
7. Run a test on all packages in a directory
Last updated