From b8eceb4f818f62751c307d59f0a2cf5ea951b915 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sat, 14 Aug 2021 23:37:51 +0800 Subject: [PATCH] SetInTestingFile return old value --- package.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.go b/package.go index 17416d2e..2a3d0ada 100644 --- a/package.go +++ b/package.go @@ -348,8 +348,9 @@ func (p *Package) CB() *CodeBuilder { } // SetInTestingFile sets inTestingFile or not. -func (p *Package) SetInTestingFile(inTestingFile bool) { - p.testingFile = getInTestingFile(inTestingFile) +func (p *Package) SetInTestingFile(inTestingFile bool) (old bool) { + p.testingFile, old = getInTestingFile(inTestingFile), p.InTestingFile() + return } // InTestingFile returns inTestingFile or not.