mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:51:44 +00:00
This PR adds better gating for disabling the code monitors, notebooks, search jobs and own features. ## Test plan Ran locally and verified the features are gone when the env var is set. Ran again without those and they worked. --------- Co-authored-by: Stefan Hengl <stefan@sourcegraph.com>
14 lines
160 B
Go
14 lines
160 B
Go
package own
|
|
|
|
import (
|
|
"os"
|
|
"strconv"
|
|
)
|
|
|
|
func IsEnabled() bool {
|
|
if v, _ := strconv.ParseBool(os.Getenv("DISABLE_OWN")); v {
|
|
return false
|
|
}
|
|
return true
|
|
}
|