mirror of
https://github.com/gogs/gogs.git
synced 2025-12-22 16:20:14 +01:00
14 lines
377 B
Go
14 lines
377 B
Go
|
|
// Copyright 2022 The Gogs Authors. All rights reserved.
|
||
|
|
// Use of this source code is governed by a MIT-style
|
||
|
|
// license that can be found in the LICENSE file.
|
||
|
|
|
||
|
|
package testutil
|
||
|
|
|
||
|
|
import (
|
||
|
|
"os"
|
||
|
|
"strings"
|
||
|
|
)
|
||
|
|
|
||
|
|
// InTest is ture if the current binary looks like a test artifact.
|
||
|
|
var InTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test")
|