github.com/fzfile/BaiduPCS-Go@v0.0.0-20200606205115-4408961cf336/internal/pcscommand/pcscommand.go (about)

     1  // Package pcscommand 命令包
     2  package pcscommand
     3  
     4  import (
     5  	"github.com/fzfile/BaiduPCS-Go/baidupcs"
     6  	"github.com/fzfile/BaiduPCS-Go/internal/pcsconfig"
     7  	"github.com/fzfile/BaiduPCS-Go/pcsverbose"
     8  )
     9  
    10  var (
    11  	pcsCommandVerbose = pcsverbose.New("PCSCOMMAND")
    12  )
    13  
    14  // GetActiveUser 获取当前登录的百度帐号
    15  func GetActiveUser() *pcsconfig.Baidu {
    16  	return pcsconfig.Config.ActiveUser()
    17  }
    18  
    19  // GetBaiduPCS 从配置读取BaiduPCS
    20  func GetBaiduPCS() *baidupcs.BaiduPCS {
    21  	return pcsconfig.Config.ActiveUserBaiduPCS()
    22  }