From f77438741d5a54e948c047d72c3b582a9e0fc32b Mon Sep 17 00:00:00 2001 From: siddontang Date: Thu, 5 Feb 2015 09:39:18 +0800 Subject: [PATCH] add make fmt and format go code --- Makefile | 3 +++ cmd/ledis-cli/const.go | 2 +- ledis/t_ttl.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2027cf2..d3b1941 100644 --- a/Makefile +++ b/Makefile @@ -33,3 +33,6 @@ test_store: test_rpl: $(GO) test --race -tags '$(GO_BUILD_TAGS)' ./rpl + +fmt: + go fmt ./... \ No newline at end of file diff --git a/cmd/ledis-cli/const.go b/cmd/ledis-cli/const.go index 54554c7..c49c745 100644 --- a/cmd/ledis-cli/const.go +++ b/cmd/ledis-cli/const.go @@ -1,4 +1,4 @@ -//This file was generated by .tools/generate_commands.py on Tue Feb 03 2015 14:21:53 +0800 +//This file was generated by .tools/generate_commands.py on Tue Feb 03 2015 14:21:53 +0800 package main var helpCommands = [][]string{ diff --git a/ledis/t_ttl.go b/ledis/t_ttl.go index 2fd2e3f..70c8088 100644 --- a/ledis/t_ttl.go +++ b/ledis/t_ttl.go @@ -139,7 +139,7 @@ func (c *ttlChecker) setNextCheckTime(when int64, force bool) { c.Lock() if force { c.nc = when - } else if c.nc > when { + } else if c.nc > when { c.nc = when } c.Unlock()