The go language is the second open source programming language released by Google 2009, a relatively new programming language. Although go is not yet mature, Google's appengine and other parts of the product have started to be written using the go language. That's why Google needs the help of external programmers. "We need better libraries and tools, and the open source community can help us a lot in these areas," Parker said.
Many people like the go language, in fact, because the go language has its own unique language attributes supporting its development in the programming language community.
Brother even education go full stack and Blockchain training course skills + practical teaching concept and outline content is different from other training institutions. "Nine courses in the teaching phase combine the user's individual basic situation, the enterprise and social development needs and the latest blockchain technology application and other multidimensional content, to control the go language full stack technology as the foundation and cover the Blockchain field related application case combat.
Package Main
Import (
"Database/sql"
"FMT"
_ "Github.com/mattn/go-sqlite3"
"Log"
"OS"
)
Type Users struct {
UserId int
Uname string
}
Func Main () {
Os. Remove ("./foo.db")
DB, err: = SQL. Open ("Sqlite3", "./foo.db")
If err! = Nil {
Log. Fatal (ERR)
}
Defer db. Close ()
sql: = ' CREATE table users (UserId integer, uname text); '
Db. Exec (SQL)
sql = ' INSERT INTO users ' (Userid,uname) VALUES (1, ' Mike '); '
Db. Exec (SQL)
sql = ' INSERT INTO users ' (Userid,uname) VALUES (2, ' John '); '
Db. Exec (SQL)
Rows, err: = db. Query ("SELECT * from users")
If err! = Nil {
Log. Fatal (ERR)
}
Defer rows. Close ()
var users []users = make ([]users, 0)
For rows. Next () {
var u Users
Rows. Scan (&u.userid, &u.uname)
Users = append (Users, u)
}
Fmt. Println (Users)
}