From 645fdc37d887ad07fad1cdf9e29fb9dbd762f292 Mon Sep 17 00:00:00 2001 From: vxclutch Date: Thu, 4 Jun 2026 07:30:08 -0400 Subject: [PATCH] maint: remove deps and add docs --- README.md | 20 ++++++++++++++++++++ bin/main.go | 2 +- go.mod | 2 -- go.sum | 2 -- lash.go | 4 ++-- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0985a9d..c71104b 100644 --- a/README.md +++ b/README.md @@ -1 +1,21 @@ # LASH (Local Area Share HTTP) + +## Usage +Using lash is pretty simple. You just provide any amount of command line +arguments and it will generate a share link, and a code. You either go-to +http://:port or goto http:// to access the +files. + +## Building from Source +Lash only has one dependency and that it is Go >= 1.26.3. To build it you just +run either of the two following commands. + +```sh +$ make +``` + +or + +```sh +$ go build -o lash ./bin/main.go +``` diff --git a/bin/main.go b/bin/main.go index 9e42e88..bac78a2 100644 --- a/bin/main.go +++ b/bin/main.go @@ -37,7 +37,7 @@ func main() { errx.Log("Your share link is %s", share.GenerateShareLink(*port)) errx.Log("Your token is \033[1;92m%s\033[0m", lash.Token) - errx.Log("starting server at http://0.0.0.0:%d", *port) + errx.Log("starting server at http://%s:%d", share.GetLocalIP(), *port) if err := server.ListenAndServe(); err != nil { errx.FatalPerror(err) } diff --git a/go.mod b/go.mod index e10bfaa..f46f04d 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,3 @@ module lash go 1.26.3 - -require github.com/google/uuid v1.6.0 diff --git a/go.sum b/go.sum index 7790d7c..e69de29 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +0,0 @@ -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= diff --git a/lash.go b/lash.go index 748542c..4b9ff1c 100644 --- a/lash.go +++ b/lash.go @@ -17,6 +17,6 @@ var Templates embed.FS //go:embed version var Version string -var Token string = generator.Generate(1) +var Token string = generator.Generate(5) -var ShareLinkToken string = generator.Generate(1) +var ShareLinkToken string = generator.Generate(8)