package com.tzld.piaoquan.recommend.model.produce.service;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * https://help.aliyun.com/zh/maxcompute/user-guide/java-sdk-1/?spm=a2c4g.11174283.0.0.6d0111c1E15lI3
 *
 * @author dyp
 */
public class CMDService {

    public Map<String, String> parse(String[] args) {
        if (args == null) {
            return Collections.emptyMap();
        }
        Map<String, String> map = new HashMap<>();
        for (int i = 0; i < args.length - 1; i++) {
            map.put(args[i].substring(1), args[i + 1]);
        }
        return map;
    }
}