Skip to content

Commit 49d642d

Browse files
committed
chore: rename tlsconfig to be go like
Signed-off-by: Mark Phelps <[email protected]>
1 parent 1c85f03 commit 49d642d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

flipt-client-go/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ The `NewClient` constructor accepts a variadic number of `Option` functions that
125125
- `WithReference`: The [reference](https://docs.flipt.io/guides/user/using-references) to use when fetching flag state. If not provided, reference will not be used.
126126
- `WithFetchMode`: The fetch mode to use when fetching flag state. If not provided, the client will default to polling.
127127
- `WithErrorStrategy`: The error strategy to use when fetching flag state. If not provided, the client will default to `Fail`. See the [Error Strategies](#error-strategies) section for more information.
128-
- `WithTlsConfig`: The TLS configuration for connecting to servers with custom certificates. See [TLS Configuration](#tls-configuration).
128+
- `WithTLSConfig`: The TLS configuration for connecting to servers with custom certificates. See [TLS Configuration](#tls-configuration).
129129

130130
### Authentication
131131

@@ -178,7 +178,7 @@ func main() {
178178
client, err := flipt.NewClient(
179179
ctx,
180180
flipt.WithURL("https://flipt.example.com"),
181-
flipt.WithTlsConfig(tlsConfig),
181+
flipt.WithTLSConfig(tlsConfig),
182182
flipt.WithClientTokenAuthentication("your-token"),
183183
)
184184
if err != nil {
@@ -214,7 +214,7 @@ tlsConfig := &tls.Config{
214214
client, err := flipt.NewClient(
215215
ctx,
216216
flipt.WithURL("https://flipt.example.com"),
217-
flipt.WithTlsConfig(tlsConfig),
217+
flipt.WithTLSConfig(tlsConfig),
218218
flipt.WithClientTokenAuthentication("your-token"),
219219
)
220220
```
@@ -232,7 +232,7 @@ tlsConfig := &tls.Config{
232232
client, err := flipt.NewClient(
233233
ctx,
234234
flipt.WithURL("https://localhost:8443"),
235-
flipt.WithTlsConfig(tlsConfig),
235+
flipt.WithTLSConfig(tlsConfig),
236236
flipt.WithClientTokenAuthentication("your-token"),
237237
)
238238
```

flipt-client-go/client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ func (s *ClientTestSuite) SetupSuite() {
4747
caCertPool := x509.NewCertPool()
4848
caCertPool.AppendCertsFromPEM(caCertData)
4949

50-
opts = append(opts, flipt.WithTlsConfig(&tls.Config{
50+
opts = append(opts, flipt.WithTLSConfig(&tls.Config{
5151
RootCAs: caCertPool,
5252
}))
5353
} else {
5454
// Fallback to insecure for local testing
55-
opts = append(opts, flipt.WithTlsConfig(&tls.Config{
55+
opts = append(opts, flipt.WithTLSConfig(&tls.Config{
5656
InsecureSkipVerify: true,
5757
}))
5858
}
@@ -71,7 +71,7 @@ func (s *ClientTestSuite) TestInvalidAuthentication() {
7171
_, err := flipt.NewClient(context.TODO(),
7272
flipt.WithURL(s.fliptURL),
7373
flipt.WithClientTokenAuthentication("invalid"),
74-
flipt.WithTlsConfig(&tls.Config{InsecureSkipVerify: true}),
74+
flipt.WithTLSConfig(&tls.Config{InsecureSkipVerify: true}),
7575
)
7676
s.EqualError(err, "failed to fetch initial state: unexpected status code: 401")
7777
}

flipt-client-go/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ func WithRequestTimeout(timeout time.Duration) Option {
9292
}
9393
}
9494

95-
// WithTlsConfig sets the TLS configuration for the client using the standard library tls.Config.
95+
// WithTLSConfig sets the TLS configuration for the client using the standard library tls.Config.
9696
// This provides maximum flexibility for configuring TLS settings including custom CAs,
9797
// mutual TLS authentication, and certificate verification options.
98-
func WithTlsConfig(tlsConfig *tls.Config) Option {
98+
func WithTLSConfig(tlsConfig *tls.Config) Option {
9999
return func(cfg *config) {
100100
if tlsConfig == nil {
101101
return

0 commit comments

Comments
 (0)