diff --git a/.github/workflows/auto-gh-pr.yml b/.github/workflows/auto-gh-pr.yml index 0913655ca..f76a0c70a 100644 --- a/.github/workflows/auto-gh-pr.yml +++ b/.github/workflows/auto-gh-pr.yml @@ -26,7 +26,8 @@ on: jobs: create-pr: runs-on: ubuntu-latest - if: github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true + if: github.event.pull_request.base.ref == 'main' + # && github.event.pull_request.merged == true steps: - name: Check out code uses: actions/checkout@v3 diff --git a/test/typecheck/typecheck.go b/test/typecheck/typecheck.go index 30bce3caa..0fc33597b 100644 --- a/test/typecheck/typecheck.go +++ b/test/typecheck/typecheck.go @@ -317,4 +317,4 @@ func main() { if failed { os.Exit(1) } -} \ No newline at end of file +} diff --git a/test/typecheck/typecheck_test.go b/test/typecheck/typecheck_test.go index 0b6c1ce0c..f7dfe0399 100644 --- a/test/typecheck/typecheck_test.go +++ b/test/typecheck/typecheck_test.go @@ -118,4 +118,4 @@ func TestDedup(t *testing.T) { i, tc.input, out, tc.expected) } } -} \ No newline at end of file +} diff --git a/tools/changelog/changelog.go b/tools/changelog/changelog.go index 7428db5fa..9a25826b1 100644 --- a/tools/changelog/changelog.go +++ b/tools/changelog/changelog.go @@ -305,4 +305,4 @@ func upstreamLinkify(line string) string { return fmt.Sprintf("UPSTREAM: [%s#%s](https://github.com/%s/pull/%s):%s", m[1], m[2], m[1], m[2], m[3]) } return line -} \ No newline at end of file +} diff --git a/tools/imctl/cmd/genman/genman.go b/tools/imctl/cmd/genman/genman.go index 24aa97a13..1de5c68cd 100644 --- a/tools/imctl/cmd/genman/genman.go +++ b/tools/imctl/cmd/genman/genman.go @@ -58,6 +58,5 @@ func main() { // openim-rpc-user switch module { case "openim-api": - - + } } diff --git a/tools/imctl/internal/imctl/cmd/profiling.go b/tools/imctl/internal/imctl/cmd/profiling.go index eaf9acceb..f0be6e38c 100644 --- a/tools/imctl/internal/imctl/cmd/profiling.go +++ b/tools/imctl/internal/imctl/cmd/profiling.go @@ -26,8 +26,8 @@ import ( // profiling configuration variables var ( - profileName string = "none" // Name of the profile to capture. - profileOutput string = "profile.pprof" // File to write the profile data. + profileName string = "none" // Name of the profile to capture. + profileOutput string = "profile.pprof" // File to write the profile data. ) // addProfilingFlags registers profiling related flags to the given FlagSet. @@ -41,8 +41,8 @@ func addProfilingFlags(flags *pflag.FlagSet) { flags.StringVar(&profileOutput, "profile-output", "profile.pprof", "File to write the profile data") } -// initProfiling sets up profiling based on the user's choice. -// If 'cpu' is selected, it starts the CPU profile. For block and mutex profiles, +// initProfiling sets up profiling based on the user's choice. +// If 'cpu' is selected, it starts the CPU profile. For block and mutex profiles, // sampling rates are set up. func initProfiling() error { switch profileName { @@ -55,10 +55,10 @@ func initProfiling() error { } return pprof.StartCPUProfile(f) case "block": - runtime.SetBlockProfileRate(1) // Sampling every block event + runtime.SetBlockProfileRate(1) // Sampling every block event return nil case "mutex": - runtime.SetMutexProfileFraction(1) // Sampling every mutex event + runtime.SetMutexProfileFraction(1) // Sampling every mutex event return nil default: if profile := pprof.Lookup(profileName); profile == nil { @@ -68,8 +68,8 @@ func initProfiling() error { } } -// flushProfiling writes the profiling data to the specified file. -// For heap profiles, it runs the GC before capturing the data. +// flushProfiling writes the profiling data to the specified file. +// For heap profiles, it runs the GC before capturing the data. // It stops the CPU profile if it was started. func flushProfiling() error { switch profileName { diff --git a/tools/yamlfmt/yamlfmt.go b/tools/yamlfmt/yamlfmt.go index 4bad00fca..38004bfde 100644 --- a/tools/yamlfmt/yamlfmt.go +++ b/tools/yamlfmt/yamlfmt.go @@ -69,4 +69,4 @@ func streamYaml(writer io.Writer, indent *int, in *yaml.Node) error { return err } return encoder.Close() -} \ No newline at end of file +} diff --git a/tools/yamlfmt/yamlfmt_test.go b/tools/yamlfmt/yamlfmt_test.go index 481eee2bc..0a72e496b 100644 --- a/tools/yamlfmt/yamlfmt_test.go +++ b/tools/yamlfmt/yamlfmt_test.go @@ -70,12 +70,12 @@ func Test_fetchYaml(t *testing.T) { Tag: "!!map", Value: "", Content: []*yaml.Node{ - &yaml.Node{ + { Kind: yaml.ScalarNode, Tag: "!!str", Value: "key", }, - &yaml.Node{ + { Kind: yaml.ScalarNode, Tag: "!!str", Value: "value", @@ -126,12 +126,12 @@ func Test_streamYaml(t *testing.T) { Tag: "!!map", Value: "", Content: []*yaml.Node{ - &yaml.Node{ + { Kind: yaml.ScalarNode, Tag: "!!str", Value: "key", }, - &yaml.Node{ + { Kind: yaml.ScalarNode, Tag: "!!str", Value: "value",