github.com/songshiyun/revive@v1.1.5-0.20220323112655-f8433a19b3c5/testdata/call-to-gc.go (about)

     1  package fixtures
     2  
     3  import (
     4  	"fmt"
     5  	"runtime"
     6  )
     7  
     8  func GC() {
     9  }
    10  
    11  func foo() {
    12  	fmt.Println("just testing")
    13  	GC()
    14  	fixtures.GC()
    15  	runtime.Goexit()
    16  	runtime.GC() // MATCH /explicit call to the garbage collector/
    17  }