| author | |
| committer | |
| log | 92d2acec54a4602b3301e005e56b1f16da6e8236 |
| tree | 56fa40ad9490408ac19aa30a65d2ec2919b3abdc |
| parent | 83d07f241ee04086be2859e952abfad5813ccaf1 |
3 files changed, 4 insertions(+), 14 deletions(-)
src/cmd/license.zig+2-12| ... | @@ -58,8 +58,8 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -58,8 +58,8 @@ pub fn execute(args: [][]u8) !void { |
| 58 | var iter = map.iterator(); | 58 | var iter = map.iterator(); |
| 59 | while (iter.next()) |entry| { | 59 | while (iter.next()) |entry| { |
| 60 | std.debug.print(style.Bold ++ "{s}:\n", .{entry.key_ptr.*}); | 60 | std.debug.print(style.Bold ++ "{s}:\n", .{entry.key_ptr.*}); |
| 61 | if (get_license(entry.key_ptr.*)) |license| { | 61 | if (u.list_contains(licenses.spdx, entry.key_ptr.*)) { |
| 62 | std.debug.print(style.Faint ++ "= {s}\n", .{license.url}); | 62 | std.debug.print(style.Faint ++ "= {s}{s}\n", .{ "https://spdx.org/licenses/", entry.key_ptr.* }); |
| 63 | } | 63 | } |
| 64 | std.debug.print(style.ResetIntensity, .{}); | 64 | std.debug.print(style.ResetIntensity, .{}); |
| 65 | for (entry.value_ptr.*.items) |item| { | 65 | for (entry.value_ptr.*.items) |item| { |
| ... | @@ -75,13 +75,3 @@ pub fn execute(args: [][]u8) !void { | ... | @@ -75,13 +75,3 @@ pub fn execute(args: [][]u8) !void { |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
| 78 | |||
| 79 | fn get_license(name: []const u8) ?licenses.License { | ||
| 80 | const T = licenses.spdx; | ||
| 81 | inline for (std.meta.declarations(T)) |decl| { | ||
| 82 | if (std.mem.eql(u8, decl.name, name)) { | ||
| 83 | return @field(T, decl.name); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | return null; | ||
| 87 | } |
zigmod.lock+1-1| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | git https://github.com/yaml/libyaml tag-0.2.5 | 2 | git https://github.com/yaml/libyaml tag-0.2.5 |
| 3 | git https://github.com/nektro/zig-ansi commit-930ab1f373012214e1a362a5d2b2cb2852242620 | 3 | git https://github.com/nektro/zig-ansi commit-930ab1f373012214e1a362a5d2b2cb2852242620 |
| 4 | git https://github.com/ziglibs/known-folders commit-f5e5fb8370de41fbc220c0c0770d62bdf00530ea | 4 | git https://github.com/ziglibs/known-folders commit-f5e5fb8370de41fbc220c0c0770d62bdf00530ea |
| 5 | git https://github.com/nektro/zig-licenses commit-16272ba5652025d9b840b83a4826746bceb783a7 | 5 | git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680 |
| 6 | git https://github.com/truemedian/zfetch commit-8bbc7b34cd417794841e1432585334bc969dfe83 | 6 | git https://github.com/truemedian/zfetch commit-8bbc7b34cd417794841e1432585334bc969dfe83 |
| 7 | git https://github.com/truemedian/hzzp commit-2d30bddae3bf1eaecde5144490307604efe76f2a | 7 | git https://github.com/truemedian/hzzp commit-2d30bddae3bf1eaecde5144490307604efe76f2a |
| 8 | git https://github.com/alexnask/iguanaTLS commit-0d39a361639ad5469f8e4dcdaea35446bbe54b48 | 8 | git https://github.com/alexnask/iguanaTLS commit-0d39a361639ad5469f8e4dcdaea35446bbe54b48 |
zigmod.sum+1-1| ... | @@ -1,7 +1,7 @@ | ... | @@ -1,7 +1,7 @@ |
| 1 | blake3-22472b867734926b202c055892fb0abb03f91556cd88998e2fe77addb003b1dd v/git/github.com/yaml/libyaml/tag-0.2.5 | 1 | blake3-22472b867734926b202c055892fb0abb03f91556cd88998e2fe77addb003b1dd v/git/github.com/yaml/libyaml/tag-0.2.5 |
| 2 | blake3-7fc0b46397932ea1f0726d42289606ca118cc745d88dd87c0d6a377ba7c6569f git/github.com/nektro/zig-ansi | 2 | blake3-7fc0b46397932ea1f0726d42289606ca118cc745d88dd87c0d6a377ba7c6569f git/github.com/nektro/zig-ansi |
| 3 | blake3-35a1c330c9999876e71418a7d43ad24ca7d1e23c3b5576e5cb75667e3392cc10 git/github.com/ziglibs/known-folders | 3 | blake3-35a1c330c9999876e71418a7d43ad24ca7d1e23c3b5576e5cb75667e3392cc10 git/github.com/ziglibs/known-folders |
| 4 | blake3-6e3f314a9f1b80e65f80ec48fe22cedd58821a35235de388948366b531de9d40 git/github.com/nektro/zig-licenses | 4 | blake3-42c3fae77ef41d2074e74de2d91cfc66bc591170494b10262dd2aeaea0b60cb5 git/github.com/nektro/zig-licenses |
| 5 | blake3-e3072f7fb47e86d53c9a1879e254ba1af55941153fd5f6752ec659b2f14854c9 git/github.com/truemedian/zfetch | 5 | blake3-e3072f7fb47e86d53c9a1879e254ba1af55941153fd5f6752ec659b2f14854c9 git/github.com/truemedian/zfetch |
| 6 | blake3-98982125d0fbedc62e179e62081d2797a2b8a3623c42f9fd5d72cd56d6350714 git/github.com/truemedian/hzzp | 6 | blake3-98982125d0fbedc62e179e62081d2797a2b8a3623c42f9fd5d72cd56d6350714 git/github.com/truemedian/hzzp |
| 7 | blake3-e6901bd7432450d5b22b01880cc7fa3fa2433e766a527206f18b29c67c1349bb git/github.com/alexnask/iguanaTLS | 7 | blake3-e6901bd7432450d5b22b01880cc7fa3fa2433e766a527206f18b29c67c1349bb git/github.com/alexnask/iguanaTLS |