MCPcopy Create free account

hub / github.com/chubin/wttr.in / functions

Functions405 in github.com/chubin/wttr.in

↓ 1 callersFunctionsuppressMessages
()
internal/server/server.go:28
↓ 1 callersFunctiontextualInformation
textualInformation returns the rich bottom metadata block (data-first)
internal/renderer/v2/block_textualinformation.go:85
↓ 1 callersFunctiontoFieldName
toFieldName turns kebab/snake-case → PascalCase
internal/generate/options.go:195
↓ 1 callersFunctiontoGoType
toGoType maps YAML type → Go type
internal/generate/options.go:181
↓ 1 callersFunctionunitVis
(unit bool, lang string)
internal/renderer/v1/locale.go:91
↓ 1 callersFunctionvalidateBooleanOption
validateBooleanOption validates and sets boolean option values.
internal/query/parse.go:153
↓ 1 callersFunctionvalidateIntegerOption
validateIntegerOption validates and sets integer option values.
internal/query/parse.go:227
↓ 1 callersFunctionvalidateStringOption
validateStringOption validates and sets string option values, including background-specific rules.
internal/query/parse.go:171
↓ 1 callersMethodwaitForInProgress
waitForInProgress waits for another goroutine to complete the request.
internal/weather/weatherer_wwo_cached.go:106
↓ 1 callersMethodwriteToDisk
writeToDisk atomically writes the entry using a temp file.
internal/cache/disk.go:49
↓ 1 callersFunctionwroteHeader
(w http.ResponseWriter)
internal/server/server.go:120
FunctionANSI256Color
Helper: create 256-color
internal/renderer/teansi/teansi.go:82
FunctionCleanupFonts
Optional: cleanup on shutdown (good practice)
internal/formatter/ansitopng/fonts.go:94
MethodClose
Close performs cleanup.
internal/cache/lru.go:162
MethodClose
()
internal/cache/disk.go:177
MethodClose
()
internal/cache/noop.go:44
MethodClose
Close cleans up resources (call on shutdown).
internal/location/cache.go:448
MethodClose
Close closes log file.
internal/logging/suppress.go:47
MethodClose
Close releases the underlying database reader resources.
internal/ip/geoip2.go:29
MethodClose
Close closes both the underlying client and the cache.
internal/weather/weatherer_wwo_cached.go:119
MethodClose
Close closes idle HTTP connections. Call this when shutting down the application.
internal/weather/weatherer_wwo.go:151
MethodCondition
Condition returns translated weather condition by numeric code.
internal/translate/bundle.go:115
MethodConditionByName
ConditionByName returns translated condition by its English name.
internal/translate/bundle.go:136
MethodConvertCache
nolint:cyclop
internal/ip/convert.go:15
FunctionDrawTemperatureDiagram
DrawTemperatureDiagram draws a clean, compact Braille temperature plot.
internal/renderer/v2/block_temperature.go:8
MethodFile
File returns the content of a localized file (e.g. help.txt, conditions.txt).
internal/localization/localizer.go:92
MethodFile
File returns raw file content (help.txt, conditions.txt, etc.)
internal/translate/bundle.go:158
MethodFormat
Format implements the Formatter interface defined in weather.go
internal/formatter/png.go:19
MethodFormat
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/html.go:45
MethodFormat
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/formatter.go:8
MethodFormat
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/formatter.go:17
MethodFormat
(query *domain.Query, output *domain.RenderOutput)
internal/formatter/formatter.go:26
MethodGet
(key string)
internal/cache/noop.go:19
MethodGetIPData
GetIPData implements the IPLocator interface.
internal/ip/geoip2.go:37
MethodGetIPData
(ip string)
internal/ip/iplocator_adapter.go:18
MethodGetLocation
GetLocation implements Locator interface
internal/weather/locator_adapter.go:38
MethodGetWeather
GetWeather returns weather data, using cache when possible.
internal/weather/weatherer_wwo_cached.go:55
MethodGetWeather
(lat, lon float64, lang string)
internal/weather/weatherer_wwo.go:71
MethodHasMultipleCerts
HasMultipleCerts returns true if the new multi-certificate config is used.
internal/server/config.go:67
MethodIsInProgress
(key string)
internal/cache/disk.go:132
MethodIsInProgress
(key string)
internal/cache/noop.go:31
MethodIsInProgress
IsInProgress returns true if the key is currently being processed by another goroutine.
internal/weather/cache.go:29
MethodLog
Log records a request. Requests from 127.0.0.1 are ignored.
internal/logging/logging.go:51
FunctionMoonAgeDays
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
FunctionMustGetFile
MustGetFile panics if file is missing (useful for init/config)
internal/assets/embed.go:21
MethodMustParse
MustParse implements QueryParser.MustParse
internal/query/queryparser.go:86
MethodMustParse
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
MethodName
()
internal/location/nominatim.go:34
FunctionProcessLogFile
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
MethodQuery
(n *Nominatim, location string)
internal/location/nominatim_locationiq.go:18
MethodQuery
(n *Nominatim, location string)
internal/location/nominatim_opencage.go:22
MethodQuery
(location string)
internal/location/nominatim.go:38
MethodRemove
Remove deletes the entry for the given key (including any in-progress marker).
internal/cache/lru.go:154
MethodRemove
Remove deletes the on-disk entry and clears any in-progress state.
internal/cache/disk.go:165
MethodRemove
(key string)
internal/cache/noop.go:40
MethodRender
Render implements the Renderer interface.
internal/renderer/renderer_page.go:21
MethodRender
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
MethodRender
Render implements the Renderer interface
internal/renderer/renderer_p1.go:61
MethodRender
(query domain.Query, localizer localization.Localizer)
internal/renderer/renderer_j1.go:12
MethodRender
────────────────────────────────────────────────────────────────────────────── Main rendering loop using the map ─────────────────────────────────────
internal/renderer/oneline/oneline.go:117
MethodRender
Render converts the query's weather JSON into the v2 terminal weather report.
internal/renderer/v2/renderer.go:28
MethodRender
Render implements the Renderer interface.
internal/renderer/subprocess/subprocess.go:64
FunctionRenderConditionCode
(ctx *RenderContext)
internal/renderer/oneline/render.go:31
FunctionRenderConditionPlain
renderConditionPlain implements the %x placeholder Returns a very simple plain-text (ASCII-like) representation of the weather condition
internal/renderer/oneline/render.go:178
FunctionRenderFeelsLike
(ctx *RenderContext)
internal/renderer/oneline/render.go:50
FunctionRenderLocalTime
(ctx *RenderContext)
internal/renderer/oneline/render.go:154
FunctionRenderLocation
(ctx *RenderContext)
internal/renderer/oneline/render.go:123
FunctionRenderMoonDay
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
FunctionRenderPrecipChance
(ctx *RenderContext)
internal/renderer/oneline/render.go:108
FunctionRenderPrecipitation
(ctx *RenderContext)
internal/renderer/oneline/render.go:97
FunctionRenderTimezone
(ctx *RenderContext)
internal/renderer/oneline/render.go:169
FunctionRenderUVIndex
(ctx *RenderContext)
internal/renderer/oneline/render.go:119
MethodResponse
Response provides routing interface to the geo cache.
internal/location/response.go:14
MethodResponse
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
MethodRoute
( opts *options.Options, r *http.Request, ipData *domain.IPData, location *domain.Location, )
internal/uplink/uplink.go:55
MethodSet
Set stores a completed cache entry and clears the in-progress state.
internal/cache/lru.go:109
MethodSet
Set stores the completed entry and notifies waiters.
internal/cache/disk.go:100
MethodSet
(key string, entry domain.CacheEntry)
internal/cache/noop.go:23
MethodSetInProgressIfNotExists
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
MethodSetInProgressIfNotExists
SetInProgressIfNotExists returns true if it successfully marked the key as in-progress.
internal/cache/disk.go:118
MethodSetInProgressIfNotExists
(key string)
internal/cache/noop.go:27
FunctionSetLineColor
SetLineColor is useful for your Braille plot: colors an entire line (or part of it).
internal/renderer/teansi/teansi.go:62
MethodString
String returns string representation of location.
internal/location/cache.go:49
FunctionTestParseCacheEntry
nolint:funlen
internal/ip/ip_test.go:13
FunctionTestRenderPrecipitationKeepsMetricDefault
(t *testing.T)
internal/renderer/oneline/render_test.go:55
FunctionTestRenderPrecipitationUsesInchesForImperialFormats
(t *testing.T)
internal/renderer/oneline/render_test.go:34
FunctionTestRenderUSCSUsesImperialWeatherFields
(t *testing.T)
internal/renderer/oneline/render_test.go:69
FunctionTestV1Renderer_Render
(t *testing.T)
internal/renderer/v1/renderer_test.go:34
FunctionTestWeatherUnits
(t *testing.T)
internal/query/queryparser_test.go:15
MethodText
Text returns translated string by key (messages, captions, v1/v2, etc.) Do NOT use it for condition codes.
internal/translate/bundle.go:94
MethodToQueryString
ToQueryString returns the options as URL query string (e.g. "format=...&lang=de").
internal/options/options.go:524
MethodValidate
Validate performs basic validation of the configuration.
internal/server/config.go:35
MethodWaitForCompletion
WaitForCompletion blocks until the in-progress flag is cleared or timeout occurs.
internal/cache/lru.go:126
MethodWaitForCompletion
WaitForCompletion blocks until the key is no longer in-progress or timeout occurs.
internal/cache/disk.go:140
MethodWaitForCompletion
(key string, maxWait time.Duration)
internal/cache/noop.go:35
MethodWithLang
WithLang returns a new L10n instance with a different language. Useful for forcing a specific language in some contexts.
internal/localization/localizer.go:98
FunctionYamlUnmarshalStrict
YamlUnmarshalStrict unmarshals YAML data with an error when unknown fields are present.
internal/util/yaml.go:10
FunctioncopyHeader
(dst, src http.Header)
internal/server/server.go:37
FunctionfaviconHandler
(w http.ResponseWriter, r *http.Request)
internal/server/server.go:45
FunctiongetLocalMidnight
──────────────────────────────────────────────── Optional: Helper to get "today" at midnight local time Useful for twilight calculations ─────────────
internal/renderer/oneline/render_solar.go:137
← previousnext →301–400 of 405, ranked by callers