Skip to content

Commit dc6f380

Browse files
emyllerclaude
andcommitted
docs: add comment explaining vsn charlist format
- Document that Application.spec/2 returns :vsn as a charlist - Clarify that string interpolation handles the conversion automatically - Ensures version is always returned in proper semver string format Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent 051b35a commit dc6f380

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/flagsmith_client.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ defmodule Flagsmith.Client do
1111
@doc false
1212
@spec user_agent() :: String.t()
1313
def user_agent do
14+
# Application.spec/2 returns :vsn as a charlist (e.g., ~c"2.2.1")
15+
# String interpolation automatically converts it to the proper string format
1416
case Application.spec(:flagsmith_engine, :vsn) do
1517
nil -> "flagsmith-elixir-sdk/unknown"
1618
vsn -> "flagsmith-elixir-sdk/#{vsn}"

0 commit comments

Comments
 (0)