Codebase list golang-go.uber-zap / 06ca39d
Add package docs and import paths to zaptest (#468) The `zaptest` package needs some (short) package-level documentation and a custom import path directive. At some point, we should write a linter for the import paths - it's too easy to forget. Akshay Shah authored 6 years ago GitHub committed 6 years ago
3 changed file(s) with 32 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 // Copyright (c) 2016 Uber Technologies, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package zaptest provides low-level helpers for testing log output. These
21 // utilities are helpful in zap's own unit tests, but any assertions using
22 // them are strongly coupled to a single encoding.
23 //
24 // Most users should use go.uber.org/zap/zaptest/observer instead of this
25 // package.
26 package zaptest // import "go.uber.org/zap/zaptest"
1717 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1818 // THE SOFTWARE.
1919
20 package observer
20 // Package observer provides a zapcore.Core that keeps an in-memory,
21 // encoding-agnostic repesentation of log entries. It's useful for
22 // applications that want to unit test their log output without tying their
23 // tests to a particular output encoding.
24 package observer // import "go.uber.org/zap/zaptest/observer"
2125
2226 import (
2327 "strings"
1717 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1818 // THE SOFTWARE.
1919
20 // Package zaptest provides helpers for testing logs.
2120 package zaptest
2221
2322 import (