1{
2    // See https://go.microsoft.com/fwlink/?LinkId=733558
3    // for the documentation about the tasks.json format
4    "version": "2.0.0",
5    "tasks": [
6        {
7            "label": "build",
8            "type": "shell",
9            "group": {
10                "kind": "build",
11                "isDefault": true
12            },
13            "problemMatcher": [
14                "$go"
15            ],
16            "presentation": {
17                "echo": true,
18                "reveal": "always",
19                "focus": false,
20                "panel": "shared",
21                "showReuseMessage": false,
22                "clear": true
23            },
24            "command": [
25                "go build -v"
26            ]
27        },
28        {
29            "label": "test",
30            "type": "shell",
31            "group": {
32                "kind": "test",
33                "isDefault": true
34            },
35            "problemMatcher": [
36                "$go"
37            ],
38            "presentation": {
39                "echo": true,
40                "reveal": "always",
41                "focus": false,
42                "panel": "shared",
43                "showReuseMessage": false,
44                "clear": true
45            },
46            "command": [
47                "go test -v &&",
48                // this will most likely fail to scrape, would need sudo to access varnishd.
49                // still runs our executable and prints varnishstat version etc.
50                "./prometheus_varnish_exporter -test"
51            ]
52        }
53    ]
54}
55