This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NAME=$(git branch | grep '*' | sed 's/* //') | |
ISSUE_NUMBER=$(git branch | grep '*' | sed 's/* //' | tr -dc '0-9') | |
if [ "$2" == "message" ]; then | |
echo "Message given, we do not modify the git commit message" | |
exit 0 | |
fi | |
if [ "$2" == "merge" ] || [ "$2" == "squash" ]; then | |
echo "$2 commit, we do not edit the message" | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright 2012 The Go Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style | |
# license that can be found in the LICENSE file. | |
# git goimports pre-commit hook | |
# | |
# To use, store as .git/hooks/pre-commit inside your repository and make sure | |
# it has execute permissions. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OUT := binariy-name | |
PKG := gitlab.com/group/project | |
VERSION := $(shell git describe --always --long --dirty) | |
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/) | |
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/) | |
all: run | |
server: | |
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type unlocked struct { | |
i int | |
} |
OlderNewer