golang.org/x/tools@v0.21.0/internal/refactor/inline/testdata/dotimport.txtar (about)

     1  Test of inlining a function that uses a dot import.
     2  
     3  -- go.mod --
     4  module testdata
     5  go 1.12
     6  
     7  -- a/a.go --
     8  package a
     9  
    10  func A() {}
    11  
    12  -- b/b.go --
    13  package b
    14  
    15  import . "testdata/a"
    16  
    17  func B() { A() }
    18  
    19  -- c/c.go --
    20  package c
    21  
    22  import "testdata/b"
    23  
    24  func _() {
    25  	b.B() //@ inline(re"B", result)
    26  }
    27  
    28  -- result --
    29  package c
    30  
    31  import (
    32  	"testdata/a"
    33  )
    34  
    35  func _() {
    36  	a.A() //@ inline(re"B", result)
    37  }