コード例 #1
0
ファイル: cm15.go プロジェクト: lopaka/rsc
// FromCommandLine builds a client from the command line.
func FromCommandLine(cmdLine *cmd.CommandLine) (*API, error) {
	raw, err := rsapi.FromCommandLine(cmdLine)
	if err != nil {
		return nil, err
	}
	return fromAPI(raw), nil
}
コード例 #2
0
ファイル: ca.go プロジェクト: lopaka/rsc
// FromCommandLine builds a client from the command line.
func FromCommandLine(cmdLine *cmd.CommandLine) (*API, error) {
	api, err := rsapi.FromCommandLine(cmdLine)
	if err != nil {
		return nil, err
	}
	setupMetadata()
	api.Host = apiHostFromLogin(cmdLine.Host)
	api.Metadata = GenMetadata
	return &API{api}, nil
}
コード例 #3
0
ファイル: ss.go プロジェクト: dylanmei/rsc
// Build client from command line
func FromCommandLine(cmdLine *cmd.CommandLine) (*Api, error) {
	api, err := rsapi.FromCommandLine(cmdLine)
	if err != nil {
		return nil, err
	}
	setupMetadata()
	api.Metadata = GenMetadata
	if api.Auth != nil {
		api.Auth.SetHost(api.Host)
	}
	return &Api{api}, nil
}