| ... | @@ -3,7 +3,7 @@ const string = []const u8; | ... | @@ -3,7 +3,7 @@ const string = []const u8; |
| 3 | const extras = @import("./lib.zig"); | 3 | const extras = @import("./lib.zig"); |
| 4 | const root = @import("root"); | 4 | const root = @import("root"); |
| 5 | | 5 | |
| 6 | pub fn globalOption(comptime T: type, comptime name: []const u8) ?T { | 6 | pub fn globalOption(comptime name: []const u8, comptime T: type) ?T { |
| 7 | if (!@hasDecl(root, name)) return null; | 7 | if (!@hasDecl(root, name)) return null; |
| 8 | return @as(T, @field(root, name)); | 8 | return @as(T, @field(root, name)); |
| 9 | } | 9 | } |