MCPcopy Index your code
hub / github.com/coder/coder / DeploymentOptionsWithoutSecrets

Function DeploymentOptionsWithoutSecrets

codersdk/deployment.go:4925–4935  ·  view source on GitHub ↗

DeploymentOptionsWithoutSecrets returns a copy of the OptionSet with secret values omitted.

(set serpent.OptionSet)

Source from the content-addressed store, hash-verified

4923
4924// DeploymentOptionsWithoutSecrets returns a copy of the OptionSet with secret values omitted.
4925func DeploymentOptionsWithoutSecrets(set serpent.OptionSet) serpent.OptionSet {
4926 cpy := make(serpent.OptionSet, 0, len(set))
4927 for _, opt := range set {
4928 cpyOpt := opt
4929 if IsSecretDeploymentOption(cpyOpt) {
4930 cpyOpt.Value = nil
4931 }
4932 cpy = append(cpy, cpyOpt)
4933 }
4934 return cpy
4935}
4936
4937// WithoutSecrets returns a copy of the config without secret values.
4938func (c *DeploymentValues) WithoutSecrets() (*DeploymentValues, error) {

Callers 2

NewOptionsFunction · 0.92
ServerMethod · 0.92

Calls 1

IsSecretDeploymentOptionFunction · 0.85

Tested by

no test coverage detected