Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to canonical doc #556

Merged
merged 79 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
e59344b
Marked existing doc comments as legacy
sacOO7 Oct 10, 2022
031f91d
Marked more doc comments as legacy
sacOO7 Oct 11, 2022
bdf5a2f
Marked connection close doc comment as legacy
sacOO7 Oct 11, 2022
21fb314
Added canonical doc comments for rest client
sacOO7 Oct 19, 2022
ff0e6d0
Updated rest client with canonical documentation
sacOO7 Oct 23, 2022
aa75cdc
Added documentation for realtime-client
sacOO7 Nov 2, 2022
afcb318
Marked comments under options as legacy
sacOO7 Nov 2, 2022
fccd61a
Added canonical comments to realtime client
sacOO7 Nov 2, 2022
2bb3c56
Added canonical docstrings to realtime client, rest client and options
sacOO7 Nov 3, 2022
d4fa591
Added canonical docstrings for token
sacOO7 Nov 4, 2022
5cab697
Added canonical doc for token and auth
sacOO7 Nov 4, 2022
2ebc232
Added canonical doc to realtime channel
sacOO7 Nov 7, 2022
c9f29d3
Added canonical doc for the token
sacOO7 Nov 7, 2022
75d0493
Added canonical doc for rest channel
sacOO7 Nov 9, 2022
366ee3c
Added canonical doc for realtime channel
sacOO7 Nov 9, 2022
6f13fdc
Added canonical doc for proto channel options
sacOO7 Nov 9, 2022
b41fb15
Added canonical doc for channel state
sacOO7 Nov 9, 2022
4748fa5
Added documentation to proto_crypto and crypto
sacOO7 Nov 10, 2022
2028d8a
Added canonical doc to realtime channel
sacOO7 Nov 10, 2022
cc7475b
added canonical doc to realtime presence
sacOO7 Nov 10, 2022
be8ae27
Added canonical doc to rest channel
sacOO7 Nov 10, 2022
2b82c9c
Added canonical doc to rest presence
sacOO7 Nov 10, 2022
076edc1
Added canonical doc to presence action
sacOO7 Nov 11, 2022
2a20965
Added canonical doc to Message struct
sacOO7 Nov 11, 2022
51a63c2
Added canonical doc to connectionDetails struct
sacOO7 Nov 11, 2022
a3947b8
Added canonical doc to realtime presence methods
sacOO7 Nov 11, 2022
1a804e7
Added documentation related to connection states and state changes
sacOO7 Nov 13, 2022
eee294b
Added documentation related to authDetails
sacOO7 Nov 13, 2022
cde5d4b
Added documentation for realtime connection
sacOO7 Nov 13, 2022
198c304
Added canonical doc for stats and related types
sacOO7 Nov 13, 2022
0282602
Added canonical doc for error
sacOO7 Nov 13, 2022
de61740
Added canonical doc for event emitter
sacOO7 Nov 13, 2022
ff42eea
Added canonical doc for httpPaginatedResponse rest client
sacOO7 Nov 13, 2022
dc19290
Removed legacy comments from ablyutils
sacOO7 Nov 13, 2022
4b6882d
Updated README for opening local godoc
sacOO7 Nov 15, 2022
5bea8f2
removed legacy comments
sacOO7 Nov 15, 2022
9fb262b
Retained legacy comments without canonical comments.
sacOO7 Nov 16, 2022
7a4272d
Retained legacy comments without canonical comments for core files
sacOO7 Nov 16, 2022
cd41cd3
Retained legacy comments without canonical comments for utils and cor…
sacOO7 Nov 17, 2022
86739b3
Added overview doc for go SDK
sacOO7 Nov 17, 2022
c66135d
Refactored canonical doc for auth to language-specific comments
sacOO7 Nov 17, 2022
f3141a8
Refactored canonical doc for crypto to language-specific comments
sacOO7 Nov 17, 2022
8946af7
Refactored canonical doc for error to language-specific comments
sacOO7 Nov 17, 2022
e4575e8
Refactored canonical doc for event_emitter to language-specific comments
sacOO7 Nov 17, 2022
4313f3a
Refactored canonical doc for merge to language-specific comments
sacOO7 Nov 17, 2022
d902861
Refactored logger comment for a logger interface
sacOO7 Nov 19, 2022
df627f8
Refactored canonical doc for authUrl/authCallback to lang specific doc
sacOO7 Nov 19, 2022
fb180e5
Refactored canonical doc for options apikey to lang specific doc
sacOO7 Nov 19, 2022
fbebde5
Refactored canonical doc for authOptions to lang specific doc
sacOO7 Nov 19, 2022
616b6aa
Refactored canonical doc for clientOptions to lang specific doc
sacOO7 Nov 19, 2022
3240a88
Refactored canonical doc for remaining clientOptions to lang specific…
sacOO7 Nov 19, 2022
4925541
Refactored canonical doc for channel options to lang specific doc
sacOO7 Nov 19, 2022
0e9f0de
Refactored canonical doc for proto channel options to lang specific doc
sacOO7 Nov 20, 2022
f58f90c
Refactored canonical doc for proto crypto to lang specific doc
sacOO7 Nov 20, 2022
f147f04
Refactored canonical doc for proto message to lang specific doc
sacOO7 Nov 20, 2022
0fa63de
Refactored canonical doc for proto presence message to lang specific doc
sacOO7 Nov 20, 2022
024f869
Refactored canonical doc for proto protocol message to lang specific doc
sacOO7 Nov 20, 2022
332a7bd
Refactored canonical doc for proto stat to lang specific doc
sacOO7 Nov 20, 2022
9e9d585
Refactored canonical doc for proto types to lang specific doc
sacOO7 Nov 20, 2022
b441103
Refactored canonical doc for realtime channel to lang specific doc
sacOO7 Nov 20, 2022
5cbf48a
Updated README for generating and viewing godoc
sacOO7 Nov 20, 2022
4453ea3
Refactored canonical doc for realtime client to lang specific doc
sacOO7 Nov 20, 2022
140b0a0
Refactored canonical doc for realtime conn to lang specific doc
sacOO7 Nov 20, 2022
7fecc24
Refactored canonical doc for realtime presence to lang specific doc
sacOO7 Nov 20, 2022
82d802c
Refactored canonical doc for rest channel to lang specific doc
sacOO7 Nov 20, 2022
5be944c
Refactored canonical doc for rest client to lang specific doc
sacOO7 Nov 20, 2022
4d9ab0c
Refactored canonical doc for rest presence to lang specific doc
sacOO7 Nov 20, 2022
4015fb2
Refactored canonical doc for token to lang specific doc
sacOO7 Nov 20, 2022
0f10f74
Refactored canonical doc for state to lang specific doc
sacOO7 Nov 20, 2022
0617e7d
Fixed realtimepresence unsubscribeall canonical doc
sacOO7 Nov 20, 2022
6dade3d
Moved web-based godoc from README to CONTRIBUTING
sacOO7 Nov 25, 2022
83a265b
Removed warning for gopages only unix based system
sacOO7 Dec 1, 2022
b5540bf
formatted using gofmt
sacOO7 Dec 23, 2022
f58155d
Fixed doc comments for auth.go options
sacOO7 Dec 23, 2022
c8b8f3e
Added section for previewing godoc locally
sacOO7 Dec 23, 2022
6e1a824
Merge branch 'main' into fix/add-canonical-docstring-comments
sacOO7 Jan 4, 2023
f224fdb
Gate gofmt Go runtime version using GitHub workflow syntax, rather th…
QuintinWillison Jan 4, 2023
38ca5ff
gofmt -w .
QuintinWillison Jan 4, 2023
9342c63
Merge branch 'main' into fix/add-canonical-docstring-comments
QuintinWillison Jan 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,8 @@ jobs:
run: go get -t -v ./ably/...

- name: Format
run: |
if go version | awk '$3 !~ /go1.18/ {exit(1)}';
then
echo -n Skipping gofmt test for ;
go version
exit 0
fi
if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi
if: matrix.go-version != '1.18'
run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi

- name: Vet
run: go vet ./ably/... ./scripts/...
Expand Down
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ Because this package uses `internal` packages, all fork development has to happe
7. push to the branch: `git push fork my-new-feature`
8. create a new Pull Request.

### Previewing Godoc Locally

1. Install [godoc](https://pkg.go.dev/golang.org/x/tools/cmd/godoc) globally via `go get` and run at root

```bash
godoc -http=:8000
```
- Open the link http://localhost:8000/ for viewing the documentation.

2. Export `godoc` using latest version of [gopages](https://pkg.go.dev/github.com/johnstarich/go/gopages#section-readme)
```bash
gopages -brand-description "Go client library for Ably realtime messaging service." -brand-title "Ably Go SDK"
```
- `godoc html` is exported to `dist` and can be served using `python3 http.server`

```bash
cd dist
py -m http.server 8000
```
- Open the link http://localhost:8000/ for viewing the documentation.

### Running Tests

This project contains two types of test. Test which use the `ablytest` package and tests which dont.
Expand Down
71 changes: 55 additions & 16 deletions ably/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,35 @@ func addHeaders(lhs, rhs http.Header) http.Header {
return lhs
}

// Auth
// Auth creates Ably [ably.TokenRequest] objects and obtains Ably Tokens from Ably to
// subsequently issue to less trusted clients.
type Auth struct {
mtx sync.Mutex
method int
client *REST
params *TokenParams // save params to use with token renewal
host string // a host part of AuthURL
clientID string // clientID of the authenticated user or wildcard "*"
mtx sync.Mutex

method int
client *REST

// params to use with token renewal
params *TokenParams

// host part of AuthURL
host string

// clientID is used for identifying this client when publishing messages or for presence purposes.
// The clientId can be any non-empty string, except it cannot contain a *.
// This option is primarily intended to be used in situations where the library is instantiated with a key.
// Note that a clientId may also be implicit in a token used to instantiate the library.
// An error is raised if a clientId specified here conflicts with the clientId implicit in the token.
// Find out more about identified clients (RSA7, RSC17, RSA12).
clientID string

// onExplicitAuthorize is the callback that Realtime sets to reauthorize with the
// server when Authorize is explicitly called.
onExplicitAuthorize func(context.Context, *TokenDetails)

serverTimeOffset time.Duration

// ServerTimeHandler when provided this will be used to query server time.
// serverTimeHandler when provided this will be used to query server time.
serverTimeHandler func() (time.Time, error)
}

Expand Down Expand Up @@ -109,7 +122,13 @@ func newAuth(client *REST) (*Auth, error) {
return a, nil
}

// ClientID
// ClientID method returns clientId if not a wildcard string (*), otherwise returns an empty string.
// It is used for identifying this client when publishing messages or for presence purposes.
// The clientId can be any non-empty string, except it cannot contain a *.
// This option is primarily intended to be used in situations where the library is instantiated with a key.
// Note that a clientId may also be implicit in a token used to instantiate the library.
// An error is raised if a clientId specified here conflicts with the clientId implicit in the token.
// Find out more about identified clients (RSA7, RSC17, RSA12).
func (a *Auth) ClientID() string {
a.mtx.Lock()
defer a.mtx.Unlock()
Expand All @@ -135,7 +154,18 @@ func (a *Auth) updateClientID(clientID string) {
a.clientID = clientID
}

// CreateTokenRequest
// CreateTokenRequest creates and signs an Ably [ably.TokenRequest] based on the specified
// (or if none specified, the client library stored) [ably.TokenParams] and [ably.AuthOption].
// Note this can only be used when the API key value is available locally.
// Otherwise, the Ably [ably.TokenRequest] must be obtained from the key owner.
// Use this to generate an Ably [ably.TokenRequest] in order to implement an Ably Token request callback for use by other clients.
// Both [ably.TokenParams] and [ably.AuthOption] are optional.
// When omitted or null, the default token parameters and authentication options for the client library are used,
// as specified in the [ably.ClientOption] when the client library was instantiated,
// or later updated with an explicit authorize request.
// Values passed in are used instead of, rather than being merged with, the default values.
// To understand why an Ably [ably.TokenRequest] may be issued to clients in favor of a token,
// see Token Authentication explained (RSA9).
func (a *Auth) CreateTokenRequest(params *TokenParams, opts ...AuthOption) (*TokenRequest, error) {
a.mtx.Lock()
defer a.mtx.Unlock()
Expand Down Expand Up @@ -169,7 +199,13 @@ func (a *Auth) createTokenRequest(params *TokenParams, opts *authOptions) (*Toke
return req, nil
}

// RequestToken
// RequestToken Calls the requestToken REST API endpoint to obtain an Ably Token according to the specified
// [ably.TokenParams] and [ably.AuthOption]. Both [ably.TokenParams] and [ably.AuthOption] are optional.
// When omitted or null, the default token parameters and authentication options for the client library are used,
// as specified in the [ably.ClientOption] when the client library was instantiated, or later updated with
// an explicit authorize request. Values passed in are used instead of, rather than being merged with,
// the default values. To understand why an Ably [ably.TokenRequest] may be issued to clients in
// favor of a token, see Token Authentication explained (RSA8e).
func (a *Auth) RequestToken(ctx context.Context, params *TokenParams, opts ...AuthOption) (*TokenDetails, error) {
a.mtx.Lock()
defer a.mtx.Unlock()
Expand Down Expand Up @@ -260,10 +296,13 @@ func (a *Auth) requestToken(ctx context.Context, params *TokenParams, opts *auth
return tok, tokReqClientID, nil
}

// Authorize performs authorization with ably service and returns the
// authorization token details.
//
// Refers to RSA10
// Authorize instructs the library to get a new authorized token immediately from ably server.
// When using the realtime client, it upgrades the current realtime connection to use the new token,
// or if not connected, initiates a connection to Ably, once the new token has been obtained.
// Also stores any [ably.TokenParams] and [ably.AuthOption] passed in as the new defaults,
// to be used for all subsequent implicit or explicit token requests. Any [ably.TokenParams] and
// [ably.AuthOption] objects passed in entirely replace, as opposed to being merged with,
// the current client library saved values (RSA10).
func (a *Auth) Authorize(ctx context.Context, params *TokenParams, setOpts ...AuthOption) (*TokenDetails, error) {
var opts *authOptions
if setOpts != nil {
Expand Down Expand Up @@ -360,7 +399,7 @@ func (a *Auth) setDefaults(opts *authOptions, req *TokenRequest) error {
return nil
}

// Timestamp returns the timestamp to be used in authorization request.
// timestamp returns the timestamp to be used in authorization request.
func (a *Auth) timestamp(ctx context.Context, query bool) (time.Time, error) {
now := a.client.opts.Now()
if !query {
Expand Down
14 changes: 10 additions & 4 deletions ably/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ import (
"io"
)

// Crypto contains the properties required to configure the encryption of [ably.Message] payloads.
var Crypto struct {
// GenerateRandomKey returns a random key. keyLength is optional; if
// non-zero, it should be in bits.

// GenerateRandomKey returns a random key (as a binary/a byte array) to be used in the encryption of the channel.
// If the language cryptographic randomness primitives are blocking or async, a callback is used.
// The callback returns a generated binary key.
// keyLength is passed as a param. It is a length of the key, in bits, to be generated.
// If not specified, this is equal to the default keyLength of the default algorithm:
// for AES this is 256 bits (RSE2).
GenerateRandomKey func(keyLength int) ([]byte, error)

// GetDefaultParams returns the provided CipherParams with missing fields
// set to default values. The Key field must be provided.
// GetDefaultParams returns a [ably.CipherParams] object, using the default values for any fields
// not supplied by the [ably.CipherParamOptions] object. The Key field must be provided (RSE1).
GetDefaultParams func(CipherParams) CipherParams
}

Expand Down
23 changes: 19 additions & 4 deletions ably/doc.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
// Package ably is the official Ably client library for Go.
// Package ably
//
// # Ably Go Client Library SDK API Reference
//
// The Go Client Library SDK supports a realtime and a REST interface. The Go API references are generated from the [Ably Go Client Library SDK source code] using [godoc] and structured by classes.
//
// The realtime interface enables a client to maintain a persistent connection to Ably and publish, subscribe and be present on channels. The REST interface is stateless and typically implemented server-side. It is used to make requests such as retrieving statistics, token authentication and publishing to a channel.
//
// View the [Ably docs] for conceptual information on using Ably, and for API references featuring all languages. The combined [API references] are organized by features and split between the [realtime] and [REST] interfaces.
//
// Get started at https://github.com/ably/ably-go#using-the-realtime-api.
//
// Event Emitters
// # Event Emitters
//
// An event emitter pattern appears in multiple places in the library.
//
Expand Down Expand Up @@ -37,7 +45,7 @@
// For messages and presence messages, "on" is called "subscribe" and "off" is
// called "unsubscribe".
//
// Paginated results
// # Paginated results
//
// Most requests to the Ably REST API return a single page of results, with
// hyperlinks to the first and next pages in the whole collection of results.
Expand All @@ -58,7 +66,7 @@
// from the iterator object. Finally, once it returns false, the Err method must
// be called to check if the iterator stopped due to some error, or else, it
// just finished going through all pages.

//
// Calling the First method on the PaginatedResults returns the first page of the
// results. However, the Next method has to be called before inspecting the items.
//
Expand All @@ -67,4 +75,11 @@
// last page. Both methods return a true or false value.
//
// See the PaginatedResults example.
//
// [Ably Go Client Library SDK source code]: https://github.com/ably/ably-go/
// [godoc]: https://pkg.go.dev/golang.org/x/tools/cmd/godoc
// [Ably docs]: https://ably.com/docs/
// [API references]: https://ably.com/docs/api/
// [realtime]: https://ably.com/docs/api/realtime-sdk?lang=go
// [REST]: https://ably.com/docs/api/rest-sdk?lang=go
package ably
19 changes: 11 additions & 8 deletions ably/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,19 @@ func codeFromStatus(statusCode int) ErrorCode {
}
}

// ErrorInfo describes error returned from Ably API. It always has non-zero error
// code. It may contain underlying error value which caused the failure
// condition.
// ErrorInfo is a generic Ably error object that contains an Ably-specific status code, and a generic status code.
// Errors returned from the Ably server are compatible with the ErrorInfo structure and should result in errors
// that inherit from ErrorInfo. It may contain underlying error value which caused the failure.
type ErrorInfo struct {
// StatusCode is a http Status code corresponding to this error, where applicable (TI1).
StatusCode int
Code ErrorCode
HRef string
Cause *ErrorInfo

// Code is the standard [ably error code]
// [ably error code]: https://github.com/ably/ably-common/blob/main/protocol/errors.json (TI1).
Code ErrorCode
// HRef is included for REST responses to provide a URL for additional help on the error code (TI4).
HRef string
// Cause provides Information pertaining to what caused the error where available (TI1).
Cause *ErrorInfo
// err is the application-level error we're wrapping, or just a message.
// If Cause is non-nil, err == *Cause.
err error
Expand All @@ -66,7 +70,6 @@ func (e ErrorInfo) Error() string {
see = " See " + errorHref
}
return fmt.Sprintf("[ErrorInfo :%s code=%d %[2]v statusCode=%d]%s", msg, e.Code, e.StatusCode, see)

}

// Unwrap implements the implicit interface that errors.Unwrap understands.
Expand Down
40 changes: 28 additions & 12 deletions ably/event_emitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"sync"
)

// eventEmitter is a generic interface for event registration and delivery used
// in a number of the types in the Realtime client library. For example, the
// [ably.Connection] object emits events for connection state using the EventEmitter pattern.
type eventEmitter struct {
sync.Mutex
listeners listenersForEvent
Expand Down Expand Up @@ -90,26 +93,38 @@ func newEventEmitter(log logger) *eventEmitter {
}
}

// On registers an event listener. The event must be comparable to the
// eventEmitter's event type, and only events equal to it will trigger the
// listener.
//
// It returns a function to deregister the listener.
// On registers the provided listener for the specified event.
// If on() is called more than once with the same listener and event, the listener is added multiple times
// to its listener registry. Therefore, as an example, assuming the same listener is registered twice using on(),
// and an event is emitted once, the listener would be invoked twice.
// It returns a function to deregister the listener (RTE4).
func (em *eventEmitter) On(event emitterEvent, handle func(emitterData)) (off func()) {
return em.on(event, handle, false)
}

// OnAll is like On, except the listener is triggered by all events.
// OnAll registers the provided listener for all events.
// If on() is called more than once with the same listener and event, the listener is added multiple times to
// its listener registry. Therefore, as an example, assuming the same listener is registered twice using on(),
// and an event is emitted once, the listener would be invoked twice (RTE4).
func (em *eventEmitter) OnAll(handle func(emitterData)) (off func()) {
return em.on(nil, handle, false)
}

// Once is like On, except the listener is deregistered once first triggered.
// Once is like On, except the listener is de-registered once first triggered.
// Registers the provided listener for the first occurrence of a single named event specified as the Event argument.
// If once() is called more than once with the same listener, the listener is added multiple times
// to its listener registry. Therefore, as an example, assuming the same listener is registered twice using once(),
// and an event is emitted once, the listener would be invoked twice. However, all subsequent events emitted
// would not invoke the listener as once() ensures that each registration is only invoked once (RTE4).
func (em *eventEmitter) Once(event emitterEvent, handle func(emitterData)) (off func()) {
return em.on(event, handle, true)
}

// OnceAll is like Once, except the listener is triggered by all events.
// OnceAll registers the provided listener for the first event that is emitted.
// If once() is called more than once with the same listener, the listener is added multiple times to
// its listener registry. Therefore, as an example, assuming the same listener is registered twice using once(),
// and an event is emitted once, the listener would be invoked twice. However, all subsequent events emitted
// would not invoke the listener as once() ensures that each registration is only invoked once (RTE4).
func (em *eventEmitter) OnceAll(handle func(emitterData)) (off func()) {
return em.on(nil, handle, true)
}
Expand Down Expand Up @@ -142,14 +157,12 @@ func (em *eventEmitter) on(event emitterEvent, handle func(emitterData), once bo
}
}

// Off deregisters event listeners. The event must be comparable to the
// eventEmitter's event type, and only listeners that were associated with that
// event will be removed.
// Off removes all listeners matching the given event.
func (em *eventEmitter) Off(event emitterEvent) {
em.off(event)
}

// OffAll is like Off, except is deregisters all event listeners.
// OffAll de-registers all registrations, for all events and listeners.
func (em *eventEmitter) OffAll() {
em.off(nil)
}
Expand All @@ -167,6 +180,9 @@ func (em *eventEmitter) off(event emitterEvent) {
}
}

// Emit sends an event, calling registered listeners with the given event name and any other given arguments.
// If an exception is raised in any of the listeners, the exception is caught by the EventEmitter
// and the exception is logged to the Ably logger (RTE6).
func (em *eventEmitter) Emit(event emitterEvent, data emitterData) {
// Let's first collect the handlers, and then call them outside the lock.
// This allows the handler functions to call again into the event emitter,
Expand Down
2 changes: 1 addition & 1 deletion ably/internal/ablyutil/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ablyutil

import "reflect"

// merge iterates over fields of struct pointed by v and when it's non-zero,
// Merge iterates over fields of struct pointed by v and when it's non-zero,
// copies its value to corresponding filed in orig.
//
// merge assumes both orig and v are pointers to a struct value of the
Expand Down
3 changes: 1 addition & 2 deletions ably/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ func (s *stdLogger) Printf(level LogLevel, format string, v ...interface{}) {
s.Logger.Printf(fmt.Sprintf("[%s] %s", level, format), v...)
}

// logger is the internal logger type, with helper methods that wrap the raw
// Logger interface.
// logger is the internal logger type, with helper methods that wrap the raw Logger interface.
type logger struct {
l Logger
}
Expand Down