mirror of
https://github.com/gogs/gogs.git
synced 2026-02-26 16:20:59 +01:00
Co-authored-by: JSS <jss@unknwon.dev> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
10 lines
212 B
Go
10 lines
212 B
Go
package testx
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
// InTest is true if the current binary looks like a test artifact.
|
|
var InTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test")
|