mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-05-12 19:08:21 +00:00
13 lines
225 B
Go
13 lines
225 B
Go
package util
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
func GetContext() context.Context {
|
|
ctx, cancel := context.WithTimeout(context.Background(), viper.GetViper().GetDuration("timeout"))
|
|
_ = cancel
|
|
return ctx
|
|
}
|