Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for Wang (0.17 sec)

  1. tests/update_many2many_test.go

    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	user.Languages = []Language{{Code: "zh-CN", Name: "Chinese"}, {Code: "en", Name: "English"}}
    	for _, lang := range user.Languages {
    		DB.Create(&lang)
    	}
    	user.Friends = []*User{{Name: "friend-1"}, {Name: "friend-2"}}
    
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user2 User
    Go
    - Registered: Sun Apr 14 09:35:11 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  2. tests/update_test.go

    func TestSaveWithPrimaryValue(t *testing.T) {
    	lang := Language{Code: "save", Name: "save"}
    	if result := DB.Save(&lang); result.RowsAffected != 1 {
    		t.Errorf("should create language, rows affected: %v", result.RowsAffected)
    	}
    
    	var result Language
    	DB.First(&result, "code = ?", "save")
    	AssertEqual(t, result, lang)
    
    	lang.Name = "save name2"
    	if result := DB.Save(&lang); result.RowsAffected != 1 {
    Go
    - Registered: Sun Apr 14 09:35:11 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  3. internal/logger/target/kafka/kafka.go

    	sconfig.Net.TLS.Config.ClientAuth = h.kconfig.TLS.ClientAuth
    	sconfig.Net.TLS.Config.RootCAs = h.kconfig.TLS.RootCAs
    
    	// These settings are needed to ensure that kafka client doesn't hang on brokers
    	// refer https://github.com/IBM/sarama/issues/765#issuecomment-254333355
    	sconfig.Producer.Retry.Max = 2
    	sconfig.Producer.Retry.Backoff = (10 * time.Second)
    	sconfig.Producer.Return.Successes = true
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.1K bytes
    - Viewed (1)
  4. misc/cgo/gmp/gmp.go

    allocated by C.  The most important consideration is not to
    constrain future implementations, so the rule is that Go code can
    hand a Go pointer to C code but must separately arrange for
    Go to hang on to a reference to the pointer until C is done with it.
    */
    package gmp
    
    /*
    #cgo LDFLAGS: -lgmp
    #include <gmp.h>
    #include <stdlib.h>
    
    // gmp 5.0.0+ changed the type of the 3rd argument to mp_bitcnt_t,
    Go
    - Registered: Tue Apr 16 11:13:10 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  5. misc/go_android_exec/main.go

    	// and wait for our os.Stderr (and os.Stdout) to close as a result.
    	// However, if the os.Stderr (or os.Stdout) file descriptors are
    	// passed on, the hanging adb subprocess will hold them open and
    	// go test will hang forever.
    	//
    	// Avoid that by wrapping stderr, breaking the short circuit and
    	// forcing cmd.Run to use another pipe and goroutine to pass
    	// along stderr from adb.
    	cmd.Stderr = struct{ io.Writer }{os.Stderr}
    Go
    - Registered: Tue Apr 16 11:13:10 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  6. tests/upsert_test.go

    	}
    
    	for _, lang := range langs {
    		var result Language
    		if err := DB.First(&result, "code = ?", lang.Code).Error; err != nil {
    			t.Errorf("Failed to query lang, got error %v", err)
    		} else {
    			AssertEqual(t, result, lang)
    		}
    	}
    
    	for idx, lang := range langs {
    		lang.Name += "_new"
    		langs[idx] = lang
    	}
    
    	if err := DB.Save(&langs).Error; err != nil {
    Go
    - Registered: Sun Apr 14 09:35:11 GMT 2024
    - Last Modified: Mon Sep 05 07:39:19 GMT 2022
    - 11.4K bytes
    - Viewed (0)
  7. istioctl/pkg/wait/wait_test.go

    	expectedOutput string // Expected constant output
    
    	wantException bool
    }
    
    func verifyExecTestOutput(t *testing.T, cmd *cobra.Command, c execTestCase) {
    	if c.wantException {
    		// Ensure tests do not hang for 30s
    		c.args = append(c.args, "--timeout=20ms")
    	}
    	var out bytes.Buffer
    	cmd.SetArgs(c.args)
    	cmd.SilenceUsage = true
    	cmd.SetOut(&out)
    	cmd.SetErr(&out)
    
    	fErr := cmd.Execute()
    Go
    - Registered: Wed Apr 17 22:53:10 GMT 2024
    - Last Modified: Fri Mar 15 08:28:50 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  8. internal/event/target/kafka.go

    	config.Net.TLS.Config.ClientAuth = args.TLS.ClientAuth
    	config.Net.TLS.Config.RootCAs = args.TLS.RootCAs
    
    	// These settings are needed to ensure that kafka client doesn't hang on brokers
    	// refer https://github.com/IBM/sarama/issues/765#issuecomment-254333355
    	config.Producer.Retry.Max = 2
    	config.Producer.Retry.Backoff = (1 * time.Second)
    	config.Producer.Return.Successes = true
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Tue Feb 20 08:16:35 GMT 2024
    - 13K bytes
    - Viewed (0)
  9. cmd/bucket-replication.go

    					return putOpts, err
    				}
    			}
    			putOpts.Internal.TaggingTimestamp = tagTimestamp
    		}
    	}
    
    	lkMap := caseInsensitiveMap(objInfo.UserDefined)
    	if lang, ok := lkMap.Lookup(xhttp.ContentLanguage); ok {
    		putOpts.ContentLanguage = lang
    	}
    	if disp, ok := lkMap.Lookup(xhttp.ContentDisposition); ok {
    		putOpts.ContentDisposition = disp
    	}
    	if cc, ok := lkMap.Lookup(xhttp.CacheControl); ok {
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Fri Apr 12 00:27:32 GMT 2024
    - 112K bytes
    - Viewed (1)
Back to top