Vij*_*jay 0 go

刚开始使用Go并遇到基本函数调用问题:

fileContentBytes := ioutil.ReadFile("serverList.txt")
fileContent := string(fileContentBytes)
serverList := strings.Split(fileContent,"\n")
   /*
serverList:
server1,
server2,
server3
   */
for _,server := range serverList {
   fmt.Println("sending ", server)
   processServer(server)
}

func processServer(s string) {
   fmt.Println(s, " : started processing")
}

输出:

sending server1
 : started processing
sending server2
 : started processing
sending server3
 server3: started processing
processServer

我究竟做错了什么?

转版本:1.8操作系统:Windows 7 x64