File: context_background_1_7.go

package info (click to toggle)
golang-github-aws-aws-sdk-go 1.21.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 104,556 kB
  • sloc: ruby: 193; makefile: 171; xml: 11
file content (20 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// +build go1.7

package aws

import "context"

// BackgroundContext returns a context that will never be canceled, has no
// values, and no deadline. This context is used by the SDK to provide
// backwards compatibility with non-context API operations and functionality.
//
// Go 1.6 and before:
// This context function is equivalent to context.Background in the Go stdlib.
//
// Go 1.7 and later:
// The context returned will be the value returned by context.Background()
//
// See https://golang.org/pkg/context for more information on Contexts.
func BackgroundContext() Context {
	return context.Background()
}