mirror of
				https://github.com/zhufuyi/sponge.git
				synced 2025-10-31 12:36:42 +08:00 
			
		
		
		
	feat: unified naming style for variable names
This commit is contained in:
		| @@ -264,22 +264,6 @@ func TestParseSQLs(t *testing.T) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func TestConvertNames(t *testing.T) { | ||||
| 	names := []string{"_id", "id", "iD", "user_id", "productId", "orderID", "user_name", "ip", "iP", "host_ip", "myIP"} | ||||
| 	var convertNames []string | ||||
| 	var convertNames2 []string | ||||
| 	var convertNames3 []string | ||||
| 	for _, name := range names { | ||||
| 		convertNames = append(convertNames, toCamel(name)) | ||||
| 		convertNames2 = append(convertNames2, customToCamel(name)) | ||||
| 		convertNames3 = append(convertNames3, customToSnake(name)) | ||||
| 	} | ||||
| 	t.Log("source:             ", names) | ||||
| 	t.Log("toCamel:           ", convertNames) | ||||
| 	t.Log("customToCamel:", convertNames2) | ||||
| 	t.Log("customToSnake:", convertNames3) | ||||
| } | ||||
|  | ||||
| func Test_parseOption(t *testing.T) { | ||||
| 	opts := []Option{ | ||||
| 		WithDBDriver("foo"), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zhuyasen
					zhuyasen