Skip to content

Commit

Permalink
removed md2 files, fixed bug with arguments passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
JocularMarrow committed May 17, 2024
1 parent 1b4e930 commit 1146c9c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@

.env
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Hashit - A CLI Tool for Hashing Files and Strings

Hashit is a command-line tool that supports various hash functions for files and strings. It provides an easy way to compute hashes using algorithms like Adler-32, MD2, MD4, MD5, SHA-1, SHA-2, SHA-3, FNV, and CRC.
Hashit is a command-line tool that supports various hash functions for files and strings. It provides an easy way to compute hashes using algorithms like Adler-32, MD4, MD5, SHA-1, SHA-2, SHA-3, FNV, and CRC.

## Features

- Hash files and strings using multiple hash functions.
- Supports the following hash algorithms:
- Adler-32
- MD2
- MD4
- MD5
- SHA-1
Expand Down
3 changes: 3 additions & 0 deletions cmd/hashit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package main

import (
"github.com/TechMDW/hashit/internal/cmd"
"github.com/joho/godotenv"
)

func main() {
godotenv.Load()

cmd.Execute()
}
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/TechMDW/hashit
go 1.21

require (
github.com/joho/godotenv v1.5.1
github.com/spf13/cobra v1.8.0
golang.org/x/crypto v0.23.0
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var rootCmd = &cobra.Command{
Short: "Hash a file using multiple hash functions",
Long: `Hash a file using Adler, MD4, MD5, SHA1, SHA2, SHA3, FNV and CRC hash functions.`,
Run: hashRun,
Args: cobra.MaximumNArgs(2),
}

func hashRun(cmd *cobra.Command, args []string) {
Expand Down
129 changes: 0 additions & 129 deletions pkg/hash/md2.go

This file was deleted.

0 comments on commit 1146c9c

Please sign in to comment.