Skip to content

Commit

Permalink
Update how we redact configs to not contain ineffectual assignments
Browse files Browse the repository at this point in the history
Change-Id: Id51d359f1729446af4628fa626d1a50edfb8bfa9
Reviewed-on: http://review.couchbase.org/c/gocbcore/+/147623
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Charles Dixon <chvckd@gmail.com>
  • Loading branch information
chvck committed Mar 8, 2021
1 parent fd90663 commit 7e49c85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions agent_config.go
Expand Up @@ -83,8 +83,7 @@ type AgentConfig struct {
}

func (config *AgentConfig) redacted() interface{} {
newConfig := AgentConfig{}
newConfig = *config
newConfig := *config
if isLogRedactionLevelFull() {
// The slices here are still pointing at config's underlying arrays
// so we need to make them not do that.
Expand Down
3 changes: 1 addition & 2 deletions clusteragent_config.go
Expand Up @@ -26,8 +26,7 @@ type clusterAgentConfig struct {
}

func (config *clusterAgentConfig) redacted() interface{} {
newConfig := clusterAgentConfig{}
newConfig = *config
newConfig := *config
if isLogRedactionLevelFull() {
// The slices here are still pointing at config's underlying arrays
// so we need to make them not do that.
Expand Down
3 changes: 1 addition & 2 deletions dcpagent_config.go
Expand Up @@ -60,8 +60,7 @@ type DCPAgentConfig struct {
}

func (config *DCPAgentConfig) redacted() interface{} {
newConfig := DCPAgentConfig{}
newConfig = *config
newConfig := *config
if isLogRedactionLevelFull() {
// The slices here are still pointing at config's underlying arrays
// so we need to make them not do that.
Expand Down

0 comments on commit 7e49c85

Please sign in to comment.