-
Type:
Task
-
Resolution: Done
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: Docs Examples
-
None
-
None
-
Go Drivers
-
Not Needed
-
-
None
-
None
-
None
-
None
-
None
-
None
Context
If I try to run the testable examples in the "/examples" directory, none of the tests will run or even build.
❯ go test go.mongodb.org/mongo-driver/v2/examples
# go.mongodb.org/mongo-driver/v2/examples
no required module provides package go.mongodb.org/mongo-driver/v2/examples; to add it:
go get go.mongodb.org/mongo-driver/v2/examples
FAIL go.mongodb.org/mongo-driver/v2/examples [setup failed]
FAIL
We effectively have a directory of Go code that the Go toolchain doesn't recognize as Go code. When writing or modifying that code, we have no indication of whether the code is either correct or even valid Go. We could be offering these examples and have no idea that they don't compile or run.
Definition of done
- Answer the following unknown: Figure out where the examples in the "/examples" directory are actually used / who they are targeting in order to determine how to maintain them moving forward. Determine whether they should be merged with the internal docs directory.
- Ensure any examples from the "/examples" directory are buildable and runnable.
Pitfalls
What should the implementer watch out for? What are the risks?