(p *profile.Profile, cmd []string, cfg config, o *plugin.Options)
| 132 | } |
| 133 | |
| 134 | func checkValue(p *profile.Profile, cmd []string, cfg config, o *plugin.Options) error { |
| 135 | if len(cmd) != 2 { |
| 136 | return fmt.Errorf("expected len(cmd)==2, got %v", cmd) |
| 137 | } |
| 138 | |
| 139 | input := cmd[1] |
| 140 | args := strings.SplitN(input, "=", 2) |
| 141 | if len(args) == 0 { |
| 142 | return fmt.Errorf("unexpected empty input") |
| 143 | } |
| 144 | name, value := args[0], "" |
| 145 | if len(args) == 2 { |
| 146 | value = args[1] |
| 147 | } |
| 148 | |
| 149 | f, ok := configFieldMap[name] |
| 150 | if !ok { |
| 151 | return fmt.Errorf("Could not find variable named %s", name) |
| 152 | } |
| 153 | |
| 154 | if got := cfg.get(f); got != value { |
| 155 | return fmt.Errorf("Variable %s, want %s, got %s", name, value, got) |
| 156 | } |
| 157 | return nil |
| 158 | } |
| 159 | |
| 160 | func interleave(input []string, seed int64) []string { |
| 161 | var inputs [][]string |
nothing calls this directly
no test coverage detected
searching dependent graphs…