mirror of
https://github.com/gogs/gogs.git
synced 2026-02-02 04:29:23 +01:00
10 lines
215 B
Go
10 lines
215 B
Go
package testutil
|
|
|
|
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")
|