clean up flake

This commit is contained in:
raf 2023-12-24 21:20:12 +03:00
parent 50298ea412
commit 768fc24f2b
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
3 changed files with 8 additions and 8 deletions

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# 🚨 mdlinkt
A CLI tool for detecting dead or inaccessible links in markdown files.

View file

@ -1,8 +1,6 @@
{ {
description = "mdlinkt: detect broken links in markdown files"; description = "mdlinkt: detect broken links in markdown files";
inputs = { inputs.nixpkgs.url = "github:NixOS/nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs = { outputs = {
self, self,
@ -12,15 +10,14 @@
forEachSystem = nixpkgs.lib.genAttrs systems; forEachSystem = nixpkgs.lib.genAttrs systems;
pkgsForEach = nixpkgs.legacyPackages; pkgsForEach = nixpkgs.legacyPackages;
in rec { in {
packages = forEachSystem (system: { packages = forEachSystem (system: {
default = pkgsForEach.${system}.callPackage ./nix/package.nix {}; default = self.packages.${system}.mdlinkt;
mdlinkt = pkgsForEach.${system}.callPackage ./nix/package.nix {};
}); });
devShells = forEachSystem (system: { devShells = forEachSystem (system: {
default = pkgsForEach.${system}.callPackage ./nix/shell.nix {}; default = pkgsForEach.${system}.callPackage ./nix/shell.nix {};
}); });
hydraJobs = packages;
}; };
} }

View file

@ -20,7 +20,7 @@ type LinkCheckResult struct {
} }
func logWithColor(level string, msg string, args ...interface{}) { func logWithColor(level string, msg string, args ...interface{}) {
timestamp := time.Now().Format("2006/01/02 15:04:05") timestamp := time.Now().Format("2006/01/02 15:04:05") // TODO: use time.RFC3339?
colorFunc := color.New(color.FgWhite).SprintFunc() colorFunc := color.New(color.FgWhite).SprintFunc()
switch level { switch level {
case "ERROR": case "ERROR":