github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/format/format_test.go (about)

     1  package format_test
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  
     7  	"github.com/johnnyeven/libtools/format"
     8  )
     9  
    10  func TestProcess(t *testing.T) {
    11  	result, _ := format.Process("format2_test.go", []byte(`
    12  	package format
    13  
    14  	import (
    15  		testing "testing"
    16  		"fmt"
    17  
    18  		"github.com/johnnyeven/libtools/format"
    19  		"github.com/johnnyeven/libtools/gin_app"
    20  
    21  		"github.com/davecgh/go-spew/spew"
    22  	)
    23  
    24  	func Test(t *testing.T) {
    25  		spew.Dump(gin_app.REQUEST_ID_NAME, format.Test)
    26  	}
    27  	`))
    28  
    29  	fmt.Println(string(result))
    30  }