Use sync/atomic instead of go.uber.org/atomic

This commit is contained in:
Joshua Casey
2023-01-20 07:17:40 -06:00
parent 24cf7c5bcd
commit b9c8e359ab
4 changed files with 11 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2021 the Pinniped contributors. All Rights Reserved.
// Copyright 2021-2023 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package server
@@ -9,9 +9,9 @@ import (
"fmt"
"net"
"net/http"
"sync/atomic"
"time"
"go.uber.org/atomic"
"k8s.io/apimachinery/pkg/util/sets"
"go.pinniped.dev/internal/certauthority"
@@ -23,8 +23,8 @@ type contextKey int
const bootstrapKey contextKey = iota
func withBootstrapConnCtx(ctx context.Context, _ net.Conn) context.Context {
isBootstrap := atomic.NewBool(false) // safe for concurrent access
return context.WithValue(ctx, bootstrapKey, isBootstrap)
isBootstrap := atomic.Bool{} // safe for concurrent access
return context.WithValue(ctx, bootstrapKey, &isBootstrap)
}
func setIsBootstrapConn(ctx context.Context) {