context_background_1_7.go 616 B

1234567891011121314151617181920
  1. // +build go1.7
  2. package aws
  3. import "context"
  4. // BackgroundContext returns a context that will never be canceled, has no
  5. // values, and no deadline. This context is used by the SDK to provide
  6. // backwards compatibility with non-context API operations and functionality.
  7. //
  8. // Go 1.6 and before:
  9. // This context function is equivalent to context.Background in the Go stdlib.
  10. //
  11. // Go 1.7 and later:
  12. // The context returned will be the value returned by context.Background()
  13. //
  14. // See https://golang.org/pkg/context for more information on Contexts.
  15. func BackgroundContext() Context {
  16. return context.Background()
  17. }