June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package log import ( "bytes" "fmt" "log" ) // Log uses the setup logger func Log() { // we'll configure the logger to write // to a bytes.Buffer buf := bytes.Buffer{} // second argument is the prefix last argument is about // options you combine them with a logical or. logger := log.New(&buf, "logger: ", log.Lshortfile|log.Ldate) logger.Println("test") logger.SetPrefix("new logger: ...Read now
Unlock full access