Initial commit

This commit is contained in:
NortPerm
2023-10-30 15:21:12 +03:00
committed by GitHub
commit 13e2575b4e
149 changed files with 3961 additions and 0 deletions

0
.scripts/.sync Normal file
View File

17
.scripts/lint.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/zsh
sed -i.bak '/- deadcode/d' .golangci.yml
sed -i '' '/- unused/d' .golangci.yml
sed -i '' '/- structcheck/d' .golangci.yml
for d in $(ls)
do
if [[ $d == hw* ]]; then
cd $d
echo "Lint ${d}..."
golangci-lint run ./...
cd ..
fi
done
mv .golangci.yml.bak .golangci.yml

16
.scripts/sync.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
dst=$1
if [[ ! -d "${dst}" ]]; then
echo "Usage: ./.scripts/sync.sh <destination dir>."
echo "The destination dir should exist"
exit 1
fi
GLOBIGNORE=".:..:.git"
for f in *; do
[[ -d "${dst}/${f}" ]] && [[ ! -f "${dst}/${f}/.sync" ]] && continue
echo "syncing ${f}..."
cp -R "${f}" "${dst}"
done

12
.scripts/update.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/zsh
for d in $(ls)
do
if [[ $d == hw* ]]; then
cd $d
echo "Update deps in ${d}..."
go mod tidy
go get -t -u ./...
cd ..
fi
done