mirror of https://github.com/docker/docs.git
fix per golint checks
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
This commit is contained in:
parent
21404e01f4
commit
f1fd1fb145
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue