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" {
Any idea how to check for connection error in database/sql?
err := db.Ping()
if err == CONNECTION_REFUSED (?) {
time.Sleep
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send a
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
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?
Thanks