Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chubin/wttr.in
/ functions
Functions
405 in github.com/chubin/wttr.in
⨍
Functions
405
◇
Types & classes
112
↓ 1 callers
Function
suppressMessages
()
internal/server/server.go:28
↓ 1 callers
Function
textualInformation
textualInformation returns the rich bottom metadata block (data-first)
internal/renderer/v2/block_textualinformation.go:85
↓ 1 callers
Function
toFieldName
toFieldName turns kebab/snake-case → PascalCase
internal/generate/options.go:195
↓ 1 callers
Function
toGoType
toGoType maps YAML type → Go type
internal/generate/options.go:181
↓ 1 callers
Function
unitVis
(unit bool, lang string)
internal/renderer/v1/locale.go:91
↓ 1 callers
Function
validateBooleanOption
validateBooleanOption validates and sets boolean option values.
internal/query/parse.go:153
↓ 1 callers
Function
validateIntegerOption
validateIntegerOption validates and sets integer option values.
internal/query/parse.go:227
↓ 1 callers
Function
validateStringOption
validateStringOption validates and sets string option values, including background-specific rules.
internal/query/parse.go:171
↓ 1 callers
Method
waitForInProgress
waitForInProgress waits for another goroutine to complete the request.
internal/weather/weatherer_wwo_cached.go:106
↓ 1 callers
Method
writeToDisk
writeToDisk atomically writes the entry using a temp file.
internal/cache/disk.go:49
↓ 1 callers
Function
wroteHeader
(w http.ResponseWriter)
internal/server/server.go:120
Function
ANSI256Color
Helper: create 256-color
internal/renderer/teansi/teansi.go:82
Function
CleanupFonts
Optional: cleanup on shutdown (good practice)
internal/formatter/ansitopng/fonts.go:94
Method
Close
Close performs cleanup.
internal/cache/lru.go:162
Method
Close
()
internal/cache/disk.go:177
Method
Close
()
internal/cache/noop.go:44
Method
Close
Close cleans up resources (call on shutdown).
internal/location/cache.go:448
Method
Close
Close closes log file.
internal/logging/suppress.go:47
Method
Close
Close releases the underlying database reader resources.
internal/ip/geoip2.go:29
Method
Close
Close closes both the underlying client and the cache.
internal/weather/weatherer_wwo_cached.go:119
Method
Close
Close closes idle HTTP connections. Call this when shutting down the application.
internal/weather/weatherer_wwo.go:151
Method
Condition
Condition returns translated weather condition by numeric code.
internal/translate/bundle.go:115
Method
ConditionByName
ConditionByName returns translated condition by its English name.
internal/translate/bundle.go:136
Method
ConvertCache
nolint:cyclop
internal/ip/convert.go:15
Function
DrawTemperatureDiagram
DrawTemperatureDiagram draws a clean, compact Braille temperature plot.
internal/renderer/v2/block_temperature.go:8
Method
File
File returns the content of a localized file (e.g. help.txt, conditions.txt).
internal/localization/localizer.go:92
Method
File
File returns raw file content (help.txt, conditions.txt, etc.)
internal/translate/bundle.go:158
Method
Format
Format implements the Formatter interface defined in weather.go
internal/formatter/png.go:19
Method
Format
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/html.go:45
Method
Format
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/formatter.go:8
Method
Format
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/formatter.go:17
Method
Format
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/formatter.go:26
Method
Get
(key string)
internal/cache/noop.go:19
Method
GetIPData
GetIPData implements the IPLocator interface.
internal/ip/geoip2.go:37
Method
GetIPData
(ip string)
internal/ip/iplocator_adapter.go:18
Method
GetLocation
GetLocation implements Locator interface
internal/weather/locator_adapter.go:38
Method
GetWeather
GetWeather returns weather data, using cache when possible.
internal/weather/weatherer_wwo_cached.go:55
Method
GetWeather
(lat, lon float64, lang string)
internal/weather/weatherer_wwo.go:71
Method
HasMultipleCerts
HasMultipleCerts returns true if the new multi-certificate config is used.
internal/server/config.go:67
Method
IsInProgress
(key string)
internal/cache/disk.go:132
Method
IsInProgress
(key string)
internal/cache/noop.go:31
Method
IsInProgress
IsInProgress returns true if the key is currently being processed by another goroutine.
internal/weather/cache.go:29
Method
Log
Log records a request. Requests from 127.0.0.1 are ignored.
internal/logging/logging.go:51
Function
MoonAgeDays
MoonAgeDays returns the approximate age of the moon in days (0 ≈ new moon, ~14.765 ≈ full moon, ~29.53 ≈ next new moon)
internal/renderer/oneline/render_moon.go:13
Function
MustGetFile
MustGetFile panics if file is missing (useful for init/config)
internal/assets/embed.go:21
Method
MustParse
MustParse implements QueryParser.MustParse
internal/query/queryparser.go:86
Method
MustParse
MustParse is a convenience variant that panics on error. Mainly useful in tests, initialization code, or when invalid input is a programmer error.
internal/weather/weather.go:68
Method
Name
()
internal/location/nominatim.go:34
Function
ProcessLogFile
ProcessLogFile reads a wttr.in log file, parses queries, and writes invalid entries to an error file. Each log line is expected in the format: "timest
internal/query/processlog.go:15
Method
Query
(n *Nominatim, location string)
internal/location/nominatim_locationiq.go:18
Method
Query
(n *Nominatim, location string)
internal/location/nominatim_opencage.go:22
Method
Query
(location string)
internal/location/nominatim.go:38
Method
Remove
Remove deletes the entry for the given key (including any in-progress marker).
internal/cache/lru.go:154
Method
Remove
Remove deletes the on-disk entry and clears any in-progress state.
internal/cache/disk.go:165
Method
Remove
(key string)
internal/cache/noop.go:40
Method
Render
Render implements the Renderer interface.
internal/renderer/renderer_page.go:21
Method
Render
Render processes the input Query and transforms the raw weather data into a minified JSON format with indentation. It removes all hourly entries from
internal/renderer/renderer_j2.go:24
Method
Render
Render implements the Renderer interface
internal/renderer/renderer_p1.go:61
Method
Render
(query domain.Query, localizer localization.Localizer)
internal/renderer/renderer_j1.go:12
Method
Render
────────────────────────────────────────────────────────────────────────────── Main rendering loop using the map ─────────────────────────────────────
internal/renderer/oneline/oneline.go:117
Method
Render
Render converts the query's weather JSON into the v2 terminal weather report.
internal/renderer/v2/renderer.go:28
Method
Render
Render implements the Renderer interface.
internal/renderer/subprocess/subprocess.go:64
Function
RenderConditionCode
(ctx *RenderContext)
internal/renderer/oneline/render.go:31
Function
RenderConditionPlain
renderConditionPlain implements the %x placeholder Returns a very simple plain-text (ASCII-like) representation of the weather condition
internal/renderer/oneline/render.go:178
Function
RenderFeelsLike
(ctx *RenderContext)
internal/renderer/oneline/render.go:50
Function
RenderLocalTime
(ctx *RenderContext)
internal/renderer/oneline/render.go:154
Function
RenderLocation
(ctx *RenderContext)
internal/renderer/oneline/render.go:123
Function
RenderMoonDay
RenderMoonDay returns approximate lunar day (days since last new moon, 0–29) Rounded to nearest integer — suitable for weather/terminal display
internal/renderer/oneline/render_moon.go:57
Function
RenderPrecipChance
(ctx *RenderContext)
internal/renderer/oneline/render.go:108
Function
RenderPrecipitation
(ctx *RenderContext)
internal/renderer/oneline/render.go:97
Function
RenderTimezone
(ctx *RenderContext)
internal/renderer/oneline/render.go:169
Function
RenderUVIndex
(ctx *RenderContext)
internal/renderer/oneline/render.go:119
Method
Response
Response provides routing interface to the geo cache.
internal/location/response.go:14
Method
Response
Response provides routing interface to the geo cache. Temporary workaround to switch IP addresses handling to the Go server. Handles two queries: -
internal/ip/ip.go:198
Method
Route
( opts *options.Options, r *http.Request, ipData *domain.IPData, location *domain.Location, )
internal/uplink/uplink.go:55
Method
Set
Set stores a completed cache entry and clears the in-progress state.
internal/cache/lru.go:109
Method
Set
Set stores the completed entry and notifies waiters.
internal/cache/disk.go:100
Method
Set
(key string, entry domain.CacheEntry)
internal/cache/noop.go:23
Method
SetInProgressIfNotExists
SetInProgressIfNotExists tries to claim responsibility for computing the key. It returns true if this goroutine should compute the value (we became t
internal/cache/lru.go:85
Method
SetInProgressIfNotExists
SetInProgressIfNotExists returns true if it successfully marked the key as in-progress.
internal/cache/disk.go:118
Method
SetInProgressIfNotExists
(key string)
internal/cache/noop.go:27
Function
SetLineColor
SetLineColor is useful for your Braille plot: colors an entire line (or part of it).
internal/renderer/teansi/teansi.go:62
Method
String
String returns string representation of location.
internal/location/cache.go:49
Function
TestParseCacheEntry
nolint:funlen
internal/ip/ip_test.go:13
Function
TestRenderPrecipitationKeepsMetricDefault
(t *testing.T)
internal/renderer/oneline/render_test.go:55
Function
TestRenderPrecipitationUsesInchesForImperialFormats
(t *testing.T)
internal/renderer/oneline/render_test.go:34
Function
TestRenderUSCSUsesImperialWeatherFields
(t *testing.T)
internal/renderer/oneline/render_test.go:69
Function
TestV1Renderer_Render
(t *testing.T)
internal/renderer/v1/renderer_test.go:34
Function
TestWeatherUnits
(t *testing.T)
internal/query/queryparser_test.go:15
Method
Text
Text returns translated string by key (messages, captions, v1/v2, etc.) Do NOT use it for condition codes.
internal/translate/bundle.go:94
Method
ToQueryString
ToQueryString returns the options as URL query string (e.g. "format=...&lang=de").
internal/options/options.go:524
Method
Validate
Validate performs basic validation of the configuration.
internal/server/config.go:35
Method
WaitForCompletion
WaitForCompletion blocks until the in-progress flag is cleared or timeout occurs.
internal/cache/lru.go:126
Method
WaitForCompletion
WaitForCompletion blocks until the key is no longer in-progress or timeout occurs.
internal/cache/disk.go:140
Method
WaitForCompletion
(key string, maxWait time.Duration)
internal/cache/noop.go:35
Method
WithLang
WithLang returns a new L10n instance with a different language. Useful for forcing a specific language in some contexts.
internal/localization/localizer.go:98
Function
YamlUnmarshalStrict
YamlUnmarshalStrict unmarshals YAML data with an error when unknown fields are present.
internal/util/yaml.go:10
Function
copyHeader
(dst, src http.Header)
internal/server/server.go:37
Function
faviconHandler
(w http.ResponseWriter, r *http.Request)
internal/server/server.go:45
Function
getLocalMidnight
──────────────────────────────────────────────── Optional: Helper to get "today" at midnight local time Useful for twilight calculations ─────────────
internal/renderer/oneline/render_solar.go:137
← previous
next →
301–400 of 405, ranked by callers