Skip to content

Commit

Permalink
Add minor doc notes and specs
Browse files Browse the repository at this point in the history
  • Loading branch information
whitfin committed Sep 25, 2024
1 parent 7aa2f5d commit 55898cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cachex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ defmodule Cachex do
end
end

# Cachex.start_link/1 exists for child specifications
@doc false
# Grace handlers for `Supervisor.child_spec/1`.
#
# Without this, Cachex is not compatible per Elixir's documentation.
@spec start_link(atom | Keyword.t()) :: {atom, pid} | {:error, :invalid_name}
def start_link(options) when is_list(options) do
case Keyword.fetch(options, :name) do
{:ok, name} ->
Expand Down

0 comments on commit 55898cb

Please sign in to comment.