[go-nuts] Re: http "alt" attribute value for img tag?

2018-04-19 Thread Victor L
i am trying html Parse method from "html"* package but can't find element "img" ...* *Any ideas?* var f func(*html.Node) f = func(n *html.Node) { if n.Type == html.ElementNode { //&& n.Data == "alt" { for _, a := range n.Attr { //if a.Key == "img" {

[go-nuts] mysql driver ?

2016-08-02 Thread Victor L
I have to query mysql database in my code...Do i need to add github mackage for mysql driver? import ( _ "github.com/go-sql-driver/mysql" ) Or is it already in "database/sql" and i need to register it? Thanks, -Victor -- You received this message because you are subscribed to the Google Groups

[go-nuts] post method in golang?

2016-07-28 Thread Victor L
I am using curl for REST call from json file, like the following: curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8080/v2/apps?force=true -d...@deploy.json How can I translate this to "golang" POST method? More specifically, how can i create request object from json file?