Perhaps I'm missing something in the documentation but I think this shows
something odd happening when the name in New() and the first filename in
ParseFiles() do not match:
package main
import (
"fmt"
"html/template"
"log"
"os"
)
// x.tpl contains just one line
Try changing the call to New to name the template the same as the first
parameter to ParseFiles
t, _ := template.New(templates.BASE).Funcs(funcMap).ParseFiles(templates.BASE,
templates.NOTIFICATIONS, templates.TICKER, templateName)
There is something odd about how ParseFiles works if the name i
On a Dial error conn will be nil. Remove the call to conn.Close()
On Saturday, 10 December 2016 23:28:36 UTC, Stannis Kozlov wrote:
>
> I'm trying to write simple port scanner and using "net" to check port
> availability:
> func sock() {
> conn, err := net.Dial("tcp", "192.168.0.1:9991")
> if