mirror of
https://github.com/gogs/gogs.git
synced 2026-05-09 00:36:11 +02:00
db: refactor "action" table to use GORM (#7054)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
13
internal/testutil/testutil.go
Normal file
13
internal/testutil/testutil.go
Normal file
@@ -0,0 +1,13 @@
|
||||
// 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")
|
||||
Reference in New Issue
Block a user