From b5d6c6768559beeabe031775537e623eaa6e6b75 Mon Sep 17 00:00:00 2001 From: surdeus Date: Sun, 1 Sep 2024 00:02:47 +0500 Subject: [PATCH] started using zed --- .gitignore | 2 +- go.mod | 2 +- go.sum | 2 ++ tool/cat/cat.go | 12 +++++++----- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 7153307..5849212 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ exe/ *.exe *.swp - +/bb diff --git a/go.mod b/go.mod index 4a74aaf..5f4a84d 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module surdeus.su/util/bb go 1.22.3 -require surdeus.su/core/cli v0.3.0 +require surdeus.su/core/cli v0.5.0 diff --git a/go.sum b/go.sum index 1bd3ad5..7ab104d 100644 --- a/go.sum +++ b/go.sum @@ -2,3 +2,5 @@ surdeus.su/core/cli v0.1.2 h1:qPzjawqPyZsO4Z5SaA1u141recVE65yioA83Qs7Jecs= surdeus.su/core/cli v0.1.2/go.mod h1:r9JtQz3aEJzpYzMaNUNQHJoYkoWKNPi047qhd5uGlmA= surdeus.su/core/cli v0.3.0 h1:/2UfObbesg3/2FPn/9Ys/w/H2XOxOv72ehidwctAGdM= surdeus.su/core/cli v0.3.0/go.mod h1:r9JtQz3aEJzpYzMaNUNQHJoYkoWKNPi047qhd5uGlmA= +surdeus.su/core/cli v0.5.0 h1:jYvE0JVDikFT9FhWGV3wIAcMgByziAVxTwsVUwWkeHs= +surdeus.su/core/cli v0.5.0/go.mod h1:r9JtQz3aEJzpYzMaNUNQHJoYkoWKNPi047qhd5uGlmA= diff --git a/tool/cat/cat.go b/tool/cat/cat.go index 950962b..9a8410c 100644 --- a/tool/cat/cat.go +++ b/tool/cat/cat.go @@ -1,13 +1,15 @@ package cat + /* Concatenate files in "stdout". */ -import( - "os" - "io" +import ( "fmt" + "io" + "os" + "surdeus.su/core/cli/mtool" ) -var( +var ( blockSize int ) @@ -37,7 +39,7 @@ func fcat(f *os.File) error { return nil } -func Run(flags *mtool.Flags) { +func Run(flags *mtool.Flags) { flags.IntVar(&blockSize, "bs", 512, "block size") flags.Parse() args := flags.Args()