env

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2025 License: GPL-3.0 Imports: 18 Imported by: 7

Documentation

Overview

* @Date: 2021-06-30 20:36:39 * @LastEditors: wangjun haodreams@163.com * @LastEditTime: 2024-12-18 13:23:02 * @FilePath: \golib\env\env.go * @Description:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateListenerTCP

func CreateListenerTCP() (listener *net.TCPListener, err error)

*

  • @description: 创建TCP listener 服务
  • @return {*}

func Init

func Init(configPath ...string) (conf config.Configer)

*

  • @description:初始化基础环境,初始化失败,程序自动退出
  • @param {string} path
  • @return {*}

func InitDefault

func InitDefault(conf config.Configer)

初始化默认的配置

func LoadConfig

func LoadConfig(path string) (conf config.Configer)

func Reset

func Reset()

Reset 重设工作目录为程序所在的目录

func ResetCurrentDir

func ResetCurrentDir()

重置工作目录为程序所在的目录

func SetLogPath

func SetLogPath(path string)

func Setup

func Setup(confPath string)

初始化设置

Types

This section is empty.