simple-bank-api

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2022 License: GPL-3.0

README

simple-bank-api

This is a simpole bank project, which is a golang web backend learning code.

note

Please create .git/hooks/pre-commitgit hook before you need to commit.

#!/bin/bash

set -ex

if [[ $( git symbolic-ref --short HEAD) = "master" ]]; then
   echo "Please commit with new branch rather than master"
   exit 1
fi

# Filter Glang files match Added (A), Copied (C), Modified (M) conditions.
gofiles=`git diff --cached --name-only --diff-filter=ACM | grep '\.go$' || true`

if [ -n "$gofiles" ]; then
    gofmt -s -w $gofiles
    goimports -w $gofiles
    git add $gofiles
fi

golangci-lint run --fix

Directories

Path Synopsis
cmd
db
mock
Package mockdb is a generated GoMock package.
Package mockdb is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL