Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Configuration/KeyCoders/ConfigKeyEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ internal protocol ConfigKeyEncoder: Sendable {
///
/// ```swift
/// let encoder = SeparatorKeyEncoder(separator: ".")
/// let key = AbsoluteConfigKey(components: ["database", "host"], context: context)
/// let key = AbsoluteConfigKey(["database", "host"], context: context)
/// let encoded = encoder.encode(key)
/// // Results in "database.host"
/// ```
Expand Down
6 changes: 3 additions & 3 deletions Sources/Configuration/KeyCoders/SeparatorKeyEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
///
/// ```swift
/// let encoder = SeparatorKeyEncoder(separator: ".")
/// let key = AbsoluteConfigKey(components: ["database", "host", "port"], context: context)
/// let key = AbsoluteConfigKey(["database", "host", "port"], context: context)
/// let encoded = encoder.encode(key)
/// // Results in "database.host.port"
/// ```
Expand Down Expand Up @@ -64,7 +64,7 @@ extension ConfigKeyEncoder where Self == SeparatorKeyEncoder {
///
/// ```swift
/// let encoder = ConfigKeyEncoder.dotSeparated
/// let key = AbsoluteConfigKey(components: ["app", "database", "host"], context: context)
/// let key = AbsoluteConfigKey(["app", "database", "host"], context: context)
/// let encoded = encoder.encode(key)
/// // Results in "app.database.host"
/// ```
Expand All @@ -79,7 +79,7 @@ extension ConfigKeyEncoder where Self == SeparatorKeyEncoder {
///
/// ```swift
/// let encoder = ConfigKeyEncoder.dashSeparated
/// let key = AbsoluteConfigKey(components: ["app", "database", "host"], context: context)
/// let key = AbsoluteConfigKey(["app", "database", "host"], context: context)
/// let encoded = encoder.encode(key)
/// // Results in "app-database-host"
/// ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ import Foundation
/// let encoder = EnvironmentKeyEncoder()
///
/// // Basic hierarchical key
/// let key1 = AbsoluteConfigKey(components: ["http", "port"], context: context)
/// let key1 = AbsoluteConfigKey(["http", "port"], context: context)
/// encoder.encode(key1) // "HTTP_PORT"
///
/// // CamelCase handling
/// let key2 = AbsoluteConfigKey(components: ["http", "serverTimeout"], context: context)
/// let key2 = AbsoluteConfigKey(["http", "serverTimeout"], context: context)
/// encoder.encode(key2) // "HTTP_SERVER_TIMEOUT"
///
/// // Special character handling
/// let key3 = AbsoluteConfigKey(components: ["http", "user-agent"], context: context)
/// let key3 = AbsoluteConfigKey(["http", "user-agent"], context: context)
/// encoder.encode(key3) // "HTTP_USER_AGENT"
/// ```
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public struct InMemoryProvider: Sendable {
/// instances or when working with keys programmatically.
///
/// ```swift
/// let key1 = AbsoluteConfigKey(components: ["database", "host"], context: [:])
/// let key2 = AbsoluteConfigKey(components: ["database", "port"], context: [:])
/// let key1 = AbsoluteConfigKey(["database", "host"], context: [:])
/// let key2 = AbsoluteConfigKey(["database", "port"], context: [:])
///
/// let provider = InMemoryProvider(
/// name: "database-config",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public final class MutableInMemoryProvider: Sendable {
/// the ``setValue(_:forKey:)`` methods.
///
/// ```swift
/// let key1 = AbsoluteConfigKey(components: ["database", "host"], context: [:])
/// let key2 = AbsoluteConfigKey(components: ["database", "port"], context: [:])
/// let key1 = AbsoluteConfigKey(["database", "host"], context: [:])
/// let key2 = AbsoluteConfigKey(["database", "port"], context: [:])
///
/// let provider = MutableInMemoryProvider(
/// name: "dynamic-config",
Expand Down Expand Up @@ -155,7 +155,7 @@ extension MutableInMemoryProvider {
///
/// ```swift
/// let provider = MutableInMemoryProvider(initialValues: [:])
/// let key = AbsoluteConfigKey(components: ["api", "enabled"], context: [:])
/// let key = AbsoluteConfigKey(["api", "enabled"], context: [:])
///
/// // Set a new value
/// provider.setValue(true, forKey: key)
Expand Down