diff options
author | Andinus <andinus@nand.sh> | 2021-08-11 15:26:15 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-08-11 15:26:15 +0530 |
commit | 321825828ac918bad28d0597a8616c6dc9802c3c (patch) | |
tree | 0b8e9cb1012197750eb58e972736319b2a6abac2 /go/two-fer/example_two_fer_test.go | |
parent | 2979ef790ac5b8f58495e0dd08cafd6a3a2e30a5 (diff) | |
download | exercism-321825828ac918bad28d0597a8616c6dc9802c3c.tar.gz |
Add solved exercises
Diffstat (limited to 'go/two-fer/example_two_fer_test.go')
-rw-r--r-- | go/two-fer/example_two_fer_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/go/two-fer/example_two_fer_test.go b/go/two-fer/example_two_fer_test.go new file mode 100644 index 0000000..fe0f023 --- /dev/null +++ b/go/two-fer/example_two_fer_test.go @@ -0,0 +1,20 @@ +package twofer + +import "fmt" + +// ExampleShareWith() is an Example function. Examples are testable snippets of +// Go code that are used for documenting and verifying the package API. +// They may be present in some exercises to demonstrate the expected use of the +// exercise API and can be run as part of a package's test suite. +// +// When an Example test is run the data that is written to standard output is +// compared to the data that comes after the "Output: " comment. +// +// Below the result of ShareWith() is passed to standard output +// using fmt.Println, and this is compared against the expected output. +// If they are equal, the test passes. +func ExampleShareWith() { + h := ShareWith("") + fmt.Println(h) + // Output: One for you, one for me. +} |