openGemini / opengemini-client-go

CNCF openGemini Go Client Library
https://opengemini.org/
Apache License 2.0
24 stars 17 forks source link

chore: t.Log used instead of fmt.Printf #95

Closed xuthus5 closed 4 months ago

xuthus5 commented 4 months ago

In our Go test files, we have inconsistent logging practices. I found that fmt.Printf was used in some test files to print debugging information or test results. According to the best practices of the Go test package, t.Log ort.Logf functions should be used instead of fmt.Print to ensure that the test output is more tightly integrated with the test framework and provide better log management and control.

https://github.com/openGemini/opengemini-client-go/blob/49423902a3ca16ac35fa57265f70914d470a964d/opengemini/write_test.go#L127

Another problem is that we need a CI to ensure that our code submission style is unified.

https://github.com/openGemini/opengemini-client-go/blob/49423902a3ca16ac35fa57265f70914d470a964d/opengemini/write_test.go#L258