Eliminate MM_SERVER_PATH (#24968)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
daf84488cc
Коммит
630bd40141
18
server/tests/path.go
Обычный файл
18
server/tests/path.go
Обычный файл
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package tests
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// GetPackagePath returns the filepath to this package for use in tests that need to read data here.
|
||||
func GetPackagePath() string {
|
||||
// Find the path to this file
|
||||
_, filename, _, _ := runtime.Caller(0)
|
||||
|
||||
// Return the containing directory
|
||||
return filepath.Dir(filename)
|
||||
}
|
||||
Ссылка в новой задаче
Block a user