mfmt

command module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 17 Imported by: 0

README

mfmt

group the imports into three parts, likes 'system' 'group' and 'others', and then format code base on go-fmt.

mfmt.png

how to use

  1. go get -u github.com/koketama/mfmt
  2. cd $GOPATH/src/repo
  3. mfmt

notice

mfmt base on go(likes /usr/local/go), you should run mfmt in develop enviroment.

setup in git hooks

  1. mkdir -p ~/.git/hooks
  2. vi ~/.git/hooks/pre-commit
#!/bin/bash

mfmt
if [ $? -ne 0 ]; then
exit 1
fi
  1. git config --global init.templatedir '~/.git'
  2. cd some_git_repo && git init

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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