From ddc53c658457c766c07f486440418ee3842f4ccd Mon Sep 17 00:00:00 2001 From: "Fabrizio (Misto) Milo" Date: Mon, 12 Aug 2013 17:10:04 -0700 Subject: [PATCH 1/2] use filepath --- etcd.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/etcd.go b/etcd.go index 241bdae54..e12ec47b0 100644 --- a/etcd.go +++ b/etcd.go @@ -1,6 +1,7 @@ package main import ( + "path/filepath" "bytes" "crypto/tls" "crypto/x509" @@ -517,13 +518,13 @@ func parseInfo(path string) *Info { func getInfo(path string) *Info { // Read in the server info if available. - infoPath := fmt.Sprintf("%s/info", path) + infoPath := filepath.Join(path, "info") // Delete the old configuration if exist if force { - logPath := fmt.Sprintf("%s/log", path) - confPath := fmt.Sprintf("%s/conf", path) - snapshotPath := fmt.Sprintf("%s/snapshot", path) + logPath := filepath.Join(path, "log") + confPath := filepath.Join(path, "conf") + snapshotPath := filepath.Join(path, "snapshot") os.Remove(infoPath) os.Remove(logPath) os.Remove(confPath) From d88bfc084b63145b14333492305c95ecd14fdb63 Mon Sep 17 00:00:00 2001 From: "Fabrizio (Misto) Milo" Date: Tue, 6 Aug 2013 18:49:10 -0700 Subject: [PATCH 2/2] fix doc --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4970955c8..e5e7fd123 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,23 @@ The latest release is available as a binary at [Github][github-release]. [github-release]: https://github.com/coreos/etcd/releases/ -You can also build etcd from source: +### Building + +You can build etcd from source: ```sh git clone https://github.com/coreos/etcd ./build ``` +This will generate a binary in the base directory called `./etcd`. + +_NOTE_: you need go 1.1+. Please check your installation with + +``` +go version +``` + ### Running a single node These examples will use a single node cluster to show you the basics of the etcd REST API. Lets start etcd: