mirror of
https://github.com/NotAShelf/mdlinkt.git
synced 2024-11-22 21:31:09 +00:00
clean up flake
This commit is contained in:
parent
50298ea412
commit
768fc24f2b
3 changed files with 8 additions and 8 deletions
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# 🚨 mdlinkt
|
||||||
|
|
||||||
|
A CLI tool for detecting dead or inaccessible links in markdown files.
|
11
flake.nix
11
flake.nix
|
@ -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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
2
main.go
2
main.go
|
@ -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":
|
||||||
|
|
Loading…
Reference in a new issue