Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit 701f218

Browse files
author
Ganesh Maharaj Mahalingam
committed
Adjust linter and README
Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
1 parent 21626f6 commit 701f218

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
language: go
22

33
go:
4-
- "1.11"
5-
- "1.12"
4+
- "1.16"
65
- tip
76

87
env:
9-
- GOLANGCILINT="v1.16.0"
8+
- GOLANGCILINT="v1.39.0"
109

1110
go_import_path: github.com/intel/ccloudvm
1211

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pre-shipped or user supplied annotated cloud-init files.
1717

1818
All you need to have installed on your machine is:
1919

20-
- Go 1.9 or greater.
20+
- Go 1.16 or greater.
2121

2222
The installation instructions for the latest version of Go can be
2323
found [here](https://golang.org/doc/install). Once installed, ensure
@@ -119,12 +119,14 @@ can specify:
119119
to run on the first boot of the VM. This file is used to create
120120
user accounts, install packages and configure the VM.
121121

122-
ccloudvm ships with a number of workloads for creating VMs based on standard images,
123-
such as Ubuntu 16.04 and Fedora 25. Users are also free to create their own workloads.
124-
Standard workloads are stored in $GOPATH/src/github.com/intel/ccloudvm/workloads.
125-
User created workloads are stored in ~/.ccloudvm/workloads. ccloudvm always checks the
126-
~/.ccloudvm/workloads directory first so if a workload exists in both directories
127-
with the same name, ccloudvm will use the workload in ~/.ccloudvm/workloads.
122+
ccloudvm ships with a number of workloads for creating VMs based on standard
123+
images, such as Ubuntu 16.04 and Fedora 25. Users are also free to create
124+
their own workloads. Standard workloads defined at
125+
$GOPATH/src/github.com/intel/ccloudvm/workloads are stored in the ccvm binary
126+
as data files. User created workloads are stored in ~/.ccloudvm/workloads.
127+
ccloudvm always checks the ~/.ccloudvm/workloads directory first so if a
128+
workload exists in both directories with the same name, ccloudvm will use the
129+
workload in ~/.ccloudvm/workloads.
128130

129131
When creating a new instance via the create command the user must specify a workload.
130132
This can be done by providing the name of a workload, present in one of the two directories

ccvm/ccvm.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ func (c ccvmBackend) createInstance(ctx context.Context, resultCh chan interface
309309
}
310310

311311
resultCh <- types.CreateResult{
312-
Line: fmt.Sprintf("VM successfully created!\n"),
312+
Line: "VM successfully created!\n",
313313
}
314314

315315
return nil

ccvm/workload.go

-6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
"path"
3232
"path/filepath"
3333
"reflect"
34-
"regexp"
3534
"text/template"
3635
"time"
3736

@@ -40,16 +39,11 @@ import (
4039
yaml "gopkg.in/yaml.v2"
4140
)
4241

43-
const ccloudvmPkg = "github.com/intel/ccloudvm"
44-
4542
//go:embed "workloads/*"
4643
var wkldfs embed.FS
4744
var allwklds, _ = fs.ReadDir(wkldfs, "workloads")
4845

49-
var indentedRegexp *regexp.Regexp
50-
5146
func init() {
52-
indentedRegexp = regexp.MustCompile(`\s+.*`)
5347
}
5448

5549
type workload struct {

0 commit comments

Comments
 (0)