doc: cleanup and improve for recently moved pkgs (#354)
* chore(atomicx): review docs and add usage example * chore(fsx): improve docs, return value, add examples * fix(kvstore): correct typo and add example * fix(multierror): add basic example * doc: revamp ooapi documentation
This commit is contained in:
parent
33de701263
commit
acd4ffff35
12 changed files with 172 additions and 26 deletions
14
internal/atomicx/example_test.go
Normal file
14
internal/atomicx/example_test.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package atomicx_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/atomicx"
|
||||
)
|
||||
|
||||
func Example_typicalUsage() {
|
||||
v := &atomicx.Int64{}
|
||||
v.Add(1)
|
||||
fmt.Printf("%d\n", v.Load())
|
||||
// Output: 1
|
||||
}
|
||||
Loading…
Reference in a new issue