Skip to content

Commit c1914d3

Browse files
author
gas
committed
pre-commit hook test
1 parent 3551b4e commit c1914d3

File tree

7 files changed

+17
-0
lines changed

7 files changed

+17
-0
lines changed

.githooks/pre-commit

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
go fmt ./...
4+
5+
if [ $? = 0 ]; then
6+
git add ./\*.go
7+
echo "Code formatted, commiting the changes..."
8+
else
9+
echo "Smth went wrong during code formatting"
10+
fi

.github/workflows/test.yml

Whitespace-only changes.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.dll
55
*.so
66
*.dylib
7+
*.swp
78

89
# Test binary, built with `go test -c`
910
*.test

clocks/clocks_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package clocks_test

clocks/hybrid_logical_clock.go

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package clocks

clocks/lamport_clock.go

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package clocks
2+
3+
import ()

clocks/vector_clock.go

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package clocks

0 commit comments

Comments
 (0)