diff --git a/src/http/handler.zig b/src/http/handler.zig index f840db4..016b5ec 100644 --- a/src/http/handler.zig +++ b/src/http/handler.zig @@ -16,7 +16,7 @@ pub const HandleWeatherOptions = struct { cache: *Cache, provider: WeatherProvider, resolver: *Resolver, - geoip: *@import("../location/GeoIP.zig"), + geoip: *@import("../location/GeoIp.zig"), }; pub fn handleWeather( diff --git a/src/location/GeoIP.zig b/src/location/GeoIp.zig similarity index 100% rename from src/location/GeoIP.zig rename to src/location/GeoIp.zig diff --git a/src/location/resolver.zig b/src/location/resolver.zig index cfc7fa0..889199b 100644 --- a/src/location/resolver.zig +++ b/src/location/resolver.zig @@ -1,5 +1,5 @@ const std = @import("std"); -const GeoIP = @import("GeoIP.zig"); +const GeoIp = @import("GeoIp.zig"); const GeoCache = @import("GeoCache.zig"); const Airports = @import("Airports.zig"); @@ -19,11 +19,11 @@ pub const LocationType = enum { pub const Resolver = struct { allocator: std.mem.Allocator, - geoip: ?*GeoIP, + geoip: ?*GeoIp, geocache: *GeoCache, airports: ?*Airports, - pub fn init(allocator: std.mem.Allocator, geoip: ?*GeoIP, geocache: *GeoCache, airports: ?*Airports) Resolver { + pub fn init(allocator: std.mem.Allocator, geoip: ?*GeoIp, geocache: *GeoCache, airports: ?*Airports) Resolver { return .{ .allocator = allocator, .geoip = geoip, diff --git a/src/main.zig b/src/main.zig index 9894b55..e4aff98 100644 --- a/src/main.zig +++ b/src/main.zig @@ -5,7 +5,7 @@ const MetNo = @import("weather/MetNo.zig"); const types = @import("weather/types.zig"); const Server = @import("http/Server.zig"); const RateLimiter = @import("http/RateLimiter.zig"); -const GeoIP = @import("location/GeoIP.zig"); +const GeoIp = @import("location/GeoIp.zig"); const GeoCache = @import("location/GeoCache.zig"); const Airports = @import("location/Airports.zig"); const Resolver = @import("location/resolver.zig").Resolver; @@ -45,7 +45,7 @@ pub fn main() !void { try geolite_downloader.ensureDatabase(allocator, cfg.geolite_path); // Initialize GeoIP database - var geoip = GeoIP.init(cfg.geolite_path) catch |err| { + var geoip = GeoIp.init(cfg.geolite_path) catch |err| { std.log.warn("Failed to load GeoIP database: {}", .{err}); std.log.warn("IP-based location resolution will be unavailable", .{}); return err; @@ -109,7 +109,7 @@ test { _ = @import("render/json.zig"); _ = @import("render/v2.zig"); _ = @import("render/custom.zig"); - _ = @import("location/GeoIP.zig"); + _ = @import("location/GeoIp.zig"); _ = @import("location/GeoCache.zig"); _ = @import("location/Airports.zig"); _ = @import("location/resolver.zig");