Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
editorconfig and makefile for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
nikaro committed Dec 13, 2019
1 parent 36c4998 commit 1bb6232
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 4
insert_final_newline = true

[*.{json,yml}]
indent_style = space
indent_size = 2
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
APP=devc

.PHONY: all
all: help

.PHONY: build
## build: build the application
build:
@echo "Building..."
@go build -o ${APP} main.go

.PHONY: run
## run: runs go run main.go
run:
go run -race main.go

.PHONY: clean
## clean: cleans the binary
clean:
@echo "Cleaning"
@rm -rf ${APP}

.PHONY: setup
## setup: setup go modules
setup:
@go mod init \
&& go mod tidy \
&& go mod vendor

.PHONY: help
## help: prints this help message
help:
@echo "Usage: \n"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

0 comments on commit 1bb6232

Please sign in to comment.