Repository navigation
change script - #495
Merged
Merged
change script#495
Conversation
wonderflow
reviewed
May 22, 2018
| New string `json:"new"` | ||
| Interprepter string `json:"interprepter"` | ||
| ScriptPath string `json:"scriptpath"` | ||
| ScriptPath string `json:"script_path"` |
wonderflow
reviewed
May 22, 2018
| keysArr := strings.Split(g.Key, ",") | ||
| keysMap := make(map[string][]string, 0) | ||
| for _, key := range keysArr { | ||
| key = strings.Trim(key, " ") |
redHJ
force-pushed
the
changeScript
branch
2 times, most recently
from
May 22, 2018 08:58
edbaf7d to
c9bb226
Compare
wonderflow
reviewed
May 22, 2018
| var gerr error | ||
| if scriptPath == "" { | ||
| params := make([]string, 0) | ||
| params = append(params, scriptPath) |
Contributor
There was a problem hiding this comment.
params := []string{scriptPath}
| err = fmt.Errorf("transform key %v data type is not string", g.Key) | ||
| continue | ||
| } else { | ||
| params = append(params, val.(string)) |
Contributor
There was a problem hiding this comment.
这里上面的 _可以写值,写成:
if val_s, ok := val.(string); !ok {
}else{
params = append(params, val_s)
}
| Required: true, | ||
| DefaultNoUse: false, | ||
| Description: "脚本执行解释器", | ||
| Description: "脚本执行解释器(interprepter)", |
Contributor
There was a problem hiding this comment.
上面的New这个key要必填了,如果不能复用,就写个新的
| ChooseOnly: false, | ||
| Default: "", | ||
| Required: false, | ||
| Required: true, |
Collaborator
Author
|
改好了 |
redHJ
force-pushed
the
changeScript
branch
3 times, most recently
from
May 22, 2018 10:06
077a5d8 to
2ec10ce
Compare
wonderflow
reviewed
May 22, 2018
| if len(GetKeys(key)) <= 0 { | ||
| continue | ||
| } | ||
| keysDetail = append(keysDetail, GetKeys(key)) |
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@wonderflow