/
yakobsonsa
/
erchat
Обзор
Документация
Войти
/
yakobsonsa
/
erchat
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
server/path.go
18 строк
442 B
Jesse Hallam
Centralize the GetPackagePath (#27004)
15 май 2024, 18:05
Не верифицирован
15 май 2024, 18:05
cd51dec
Код
Авторство
О чём код?
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. package server 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) }