mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
382b986520
The intent of this function is to return a copy of the service's configuration, and to copy / dereference the options in its configuration. The code was doing this in slightly complicated fashion. This patch; - adds a `copy()` function to serviceConfig - rewrites the code to use a slightly more idiomatic approach, using one of the approaches described in "golang SliceTricks" https://github.com/golang/go/wiki/SliceTricks#copy - changes defaultService.ServiceConfig() to use this function, and updates its godoc to better describe that it returns a copy. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
resumable | ||
auth.go | ||
auth_test.go | ||
config.go | ||
config_test.go | ||
config_unix.go | ||
config_windows.go | ||
endpoint_test.go | ||
endpoint_v1.go | ||
errors.go | ||
registry.go | ||
registry_mock_test.go | ||
registry_test.go | ||
service.go | ||
service_v2.go | ||
session.go | ||
types.go |