github.com/jaypipes/ghw@v0.21.1/pkg/snapshot/trace.go (about)

     1  //
     2  // Use and distribution licensed under the Apache license version 2.
     3  //
     4  // See the COPYING file in the root project directory for full text.
     5  //
     6  
     7  package snapshot
     8  
     9  var trace func(msg string, args ...interface{})
    10  
    11  func init() {
    12  	trace = func(msg string, args ...interface{}) {}
    13  }
    14  
    15  func SetTraceFunction(fn func(msg string, args ...interface{})) {
    16  	trace = fn
    17  }