Skip to content

Commit e643231

Browse files
authored
Merge pull request #8 from chai2010/dev
refactoring dir struct for go module
2 parents 72b951c + 7460b2b commit e643231

File tree

8 files changed

+21
-29
lines changed

8 files changed

+21
-29
lines changed

.travis.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
1-
sudo: required
2-
3-
services:
4-
- docker
1+
# Copyright 2018 The OpenPitrix Authors. All rights reserved.
2+
# Use of this source code is governed by a Apache license
3+
# that can be found in the LICENSE file.
54

65
language: go
76

87
go:
9-
- 1.9
10-
- tip
8+
- '1.11'
9+
- 'tip'
1110

1211
go_import_path: openpitrix.io/libconfd
1312

14-
before_install:
15-
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
16-
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
17-
- sudo apt-get update
18-
- sudo apt-get -y install docker-ce
19-
- go get golang.org/x/crypto/...
20-
- go get github.com/golang/glog
21-
- go get github.com/BurntSushi/toml
22-
- go get github.com/coreos/etcd/clientv3
23-
24-
before_script:
25-
- docker --version
26-
2713
script:
28-
- make test
14+
- env GO111MODULE=on go test ./...
15+
- env GO111MODULE=on go vet ./...
File renamed without changes.

etcdv3/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright 2018 The OpenPitrix Authors. All rights reserved.
2+
// Use of this source code is governed by a Apache license
3+
// that can be found in the LICENSE file.
4+
5+
module openpitrix.io/libconfd/etcdv3

miniconfd.go renamed to etcdv3/miniconfd-etcdv3/miniconfd.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a Apache license
33
// that can be found in the LICENSE file.
44

5-
// +build ignore
6-
75
package main
86

97
import (
@@ -14,7 +12,7 @@ import (
1412
"github.com/urfave/cli"
1513

1614
"openpitrix.io/openpitrix/pkg/libconfd"
17-
_ "openpitrix.io/openpitrix/pkg/libconfd/backends"
15+
_ "openpitrix.io/openpitrix/pkg/libconfd/etcdv3/backends"
1816
)
1917

2018
func main() {

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
// Use of this source code is governed by a Apache license
33
// that can be found in the LICENSE file.
44

5-
module "openpitrix.io/libconfd"
5+
module openpitrix.io/libconfd
66

77
require (
8-
"github.com/BurntSushi/toml" v0.3.0
9-
"github.com/coreos/etcd/clientv3" v3.3.0
10-
"github.com/urfave/cli" v1.20.0
11-
"golang.org/x/crypto" v0.0.0-20180219163459-432090b8f568
8+
github.com/BurntSushi/toml v0.3.1
9+
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e
1210
)

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
2+
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
3+
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e h1:IzypfodbhbnViNUO/MEh0FzCUooG97cIGfdggUrUSyU=
4+
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=

metad/dummy.txt

Whitespace-only changes.

resource_processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ func (_ *TemplateResourceProcessor) runCommand(cmd string) error {
386386

387387
output, err := c.CombinedOutput()
388388
if err != nil {
389-
GetLogger().Errorf("%q", string(output))
389+
GetLogger().Errorf("%v, output: %q", err, string(output))
390390
return err
391391
}
392392

0 commit comments

Comments
 (0)