mirror of
https://github.com/distribution/distribution
synced 2024-11-06 19:35:52 +01:00
731e0b0066
You shouldn't have to import both: github.com/docker/distribution/context golang.org/x/net/context just to use the distribution tools and implement the distribution interfaces. By pulling the Context interface from golang.org/x/net/context into the context package within the distribution project, you no longer have to import both packages. Note: You do not have to change anything anywhere else yet! All current uses of both packages together will still work correctly because the Context interface from either package is identical. I've also made some other minor changes: - Added a RemoteIP function. It's like RemoteAddr but discards the port suffix - Added `.String()` to the response duration context value so that JSON log formatting shows human-parseable duration and not just number of nano-seconds - Added WithMapContext(...) to the context package. This is a useful function so I pulled it out of the main.go in cmd/registry so that it can be used elsewhere. Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
38 lines
433 B
Plaintext
38 lines
433 B
Plaintext
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
|
*.o
|
|
*.a
|
|
*.so
|
|
|
|
# Folders
|
|
_obj
|
|
_test
|
|
|
|
# Architecture specific extensions/prefixes
|
|
*.[568vq]
|
|
[568vq].out
|
|
|
|
*.cgo1.go
|
|
*.cgo2.c
|
|
_cgo_defun.c
|
|
_cgo_gotypes.go
|
|
_cgo_export.*
|
|
|
|
_testmain.go
|
|
|
|
*.exe
|
|
*.test
|
|
*.prof
|
|
|
|
# never checkin from the bin file (for now)
|
|
bin/*
|
|
|
|
# Test key files
|
|
*.pem
|
|
|
|
# Cover profiles
|
|
*.out
|
|
|
|
# Editor/IDE specific files.
|
|
*.sublime-project
|
|
*.sublime-workspace
|