Skip to content

Commit

Permalink
Use Go's convention for documenting deprecated methods and functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Feb 27, 2018
1 parent dbc9770 commit 6b1d27f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ func (c *Client) WithTransport(trFunc func() *http.Transport) {
c.initializeNativeClient(trFunc)
}

// NewVersionnedTLSClient has been DEPRECATED, please use NewVersionedTLSClient.
// NewVersionnedTLSClient is like NewVersionedClient, but with ann extra n.
//
// Deprecated: Use NewVersionedTLSClient instead.
func NewVersionnedTLSClient(endpoint string, cert, key, ca, apiVersionString string) (*Client, error) {
return NewVersionedTLSClient(endpoint, cert, key, ca, apiVersionString)
}
Expand Down
9 changes: 5 additions & 4 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -1287,19 +1287,20 @@ func (c *Client) DownloadFromContainer(id string, opts DownloadFromContainerOpti
})
}

// CopyFromContainerOptions has been DEPRECATED, please use DownloadFromContainerOptions along with DownloadFromContainer.
// CopyFromContainerOptions contains the set of options used for copying
// files from a container.
//
// See https://goo.gl/nWk2YQ for more details.
// Deprecated: Use DownloadFromContainerOptions and DownloadFromContainer instead.
type CopyFromContainerOptions struct {
OutputStream io.Writer `json:"-"`
Container string `json:"-"`
Resource string
Context context.Context `json:"-"`
}

// CopyFromContainer has been DEPRECATED, please use DownloadFromContainerOptions along with DownloadFromContainer.
// CopyFromContainer copies files from a container.
//
// See https://goo.gl/nWk2YQ for more details.
// Deprecated: Use DownloadFromContainer and DownloadFromContainer instead.
func (c *Client) CopyFromContainer(opts CopyFromContainerOptions) error {
if opts.Container == "" {
return &NoSuchContainer{ID: opts.Container}
Expand Down

0 comments on commit 6b1d27f

Please sign in to comment.