支持dataspace
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
|
||||
type createTaskParams struct {
|
||||
hashFile string
|
||||
appid string
|
||||
task *saasapi.Task
|
||||
saasHttp *saashttp.SaasClient
|
||||
}
|
||||
@@ -21,9 +20,7 @@ type createTaskParams struct {
|
||||
func RunTaskCreate(args ...string) error {
|
||||
fs := flag.NewFlagSet("create", flag.ExitOnError)
|
||||
cfgFile := paramConfig(fs)
|
||||
// sourcePath := paramSourceConvertedPath(fs)
|
||||
hashFile := paramInputHashFile(fs)
|
||||
appid := paramAppid(fs)
|
||||
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "command line parse error", "err", err)
|
||||
@@ -43,7 +40,6 @@ func RunTaskCreate(args ...string) error {
|
||||
|
||||
createTaskParams := createTaskParams{
|
||||
hashFile: *hashFile,
|
||||
appid: *appid,
|
||||
saasHttp: &saashttp.SaasClient{
|
||||
Client: &http.Client{},
|
||||
ApiUrls: &cfg.ApiUrls,
|
||||
@@ -72,11 +68,6 @@ func doTaskCreate(createTaskParams createTaskParams) error {
|
||||
},
|
||||
}
|
||||
|
||||
if createTaskParams.appid != "" {
|
||||
saasReq.UseridType = saasapi.UserIdType_OPENID
|
||||
saasReq.Appid = createTaskParams.appid
|
||||
}
|
||||
|
||||
res, err := createTaskParams.saasHttp.TaskCreate(saasReq)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user