mirror of
https://github.com/livebook-dev/livebook.git
synced 2026-01-06 23:58:38 +08:00
parent
add3de24b7
commit
bf16cd3e6a
1 changed files with 2 additions and 1 deletions
|
|
@ -549,12 +549,13 @@ defmodule Livebook.Utils do
|
|||
"localhost"
|
||||
|
||||
iex> Livebook.Utils.ip_to_host({0, 0, 0, 0})
|
||||
"0.0.0.0"
|
||||
"localhost"
|
||||
|
||||
"""
|
||||
@spec ip_to_host(:inet.ip_address()) :: String.t()
|
||||
def ip_to_host(ip)
|
||||
|
||||
def ip_to_host({0, 0, 0, 0}), do: "localhost"
|
||||
def ip_to_host({127, 0, 0, 1}), do: "localhost"
|
||||
|
||||
def ip_to_host(ip) do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue