Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleDB_Prepare (0.19 sec)

  1. src/database/sql/example_test.go

    	ctx, cancel := context.WithTimeout(ctx, 1*time.Second)
    	defer cancel()
    
    	status := "up"
    	if err := db.PingContext(ctx); err != nil {
    		status = "down"
    	}
    	log.Println(status)
    }
    
    func ExampleDB_Prepare() {
    	projects := []struct {
    		mascot  string
    		release int
    	}{
    		{"tux", 1991},
    		{"duke", 1996},
    		{"gopher", 2009},
    		{"moby dock", 2013},
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 28 14:05:09 UTC 2020
    - 8.5K bytes
    - Viewed (0)
Back to top