fix per golint checks

Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
This commit is contained in:
Chanwit Kaewkasi 2015-03-28 00:52:53 +07:00
parent 21404e01f4
commit f1fd1fb145
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ func (s *FileDiscoveryService) Initialize(path string, heartbeat int) error {
}
func parseFileContent(content []byte) []string {
result := make([]string, 0)
var result []string
for _, line := range strings.Split(strings.TrimSpace(string(content)), "\n") {
for _, ip := range discovery.Generate(line) {
result = append(result, ip)

View File

@ -27,7 +27,7 @@ func Generate(pattern string) []string {
template := re.ReplaceAllString(pattern, "%d")
result := make([]string, 0)
var result []string
for val := from; val <= to; val++ {
entry := fmt.Sprintf(template, val)
result = append(result, entry)