From 5cfc96676aa648fe3ff19b0ae944f7b9cc7d8bae Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 10 Feb 2017 16:40:20 -0500 Subject: [PATCH] docs: little fixes --- README.md | 16 +++++++++++++--- docs/guide/example-plugin.md | 4 +--- docs/guide/install.md | 13 +++++++++++-- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5028d6ef3c..047bca7093 100644 --- a/README.md +++ b/README.md @@ -15,18 +15,28 @@ WARNING: Currently uses plain-text private keys for transactions and is otherwis ## Installation -We use glide for dependency management. The prefered way of compiling from source is the following: +On a good day, basecoin can be installed like a normal Go program: + +``` +go get -u github.com/tendermint/basecoin/cmd/basecoin +``` + +In some cases, if that fails, or if another branch is required, +we use `glide` for dependency management. + +The guaranteed correct way of compiling from source, assuming you've already +run `go get` or otherwise cloned the repo, is: ``` -go get -u github.com/tendermint/basecoin cd $GOPATH/src/github.com/tendermint/basecoin -git checkout develop # (until we release v0.9) +git checkout develop # (until we release tendermint v0.9) make get_vendor_deps make install ``` This will create the `basecoin` binary in `$GOPATH/bin`. + ## Command Line Interface The basecoin CLI can be used to start a stand-alone basecoin instance (`basecoin start`), diff --git a/docs/guide/example-plugin.md b/docs/guide/example-plugin.md index ff9e77a62e..e8a431ea5a 100644 --- a/docs/guide/example-plugin.md +++ b/docs/guide/example-plugin.md @@ -166,8 +166,6 @@ but are necessary boilerplate. Your plugin may have additional requirements that utilize these other methods. Here's what's relevant for us: -**TODO** make `StateKey` `stateKey`? No need to expose this outside the package. - ``` type ExamplePluginState struct { Counter int @@ -278,7 +276,7 @@ if len(stateBytes) > 0 { } ``` -Note the state is stored under `ep.StateKey()`, which is defined above as `ExamplePlugin.State`. Also note, that we do nothing if there is no existing state data. Is that a bug? No, we just make use of go's variable initialization, that `pluginState` will contain a `Counter` value of 0. If your app needs more initialization than empty variables, then do this logic here in an `else` block. +Note the state is stored under `ep.StateKey()`, which is defined above as `ExamplePlugin.State`. Also note, that we do nothing if there is no existing state data. Is that a bug? No, we just make use of Go's variable initialization, that `pluginState` will contain a `Counter` value of 0. If your app needs more initialization than empty variables, then do this logic here in an `else` block. Finally, we can update the state's `Counter`, and save the state back to the store: diff --git a/docs/guide/install.md b/docs/guide/install.md index b9acb5455b..2a04abe73b 100644 --- a/docs/guide/install.md +++ b/docs/guide/install.md @@ -1,9 +1,18 @@ # Install -We use glide for dependency management. The prefered way of compiling from source is the following: +On a good day, basecoin can be installed like a normal Go program: + +``` +go get -u github.com/tendermint/basecoin/cmd/basecoin +``` + +In some cases, if that fails, or if another branch is required, +we use `glide` for dependency management. + +The correct way of compiling from source, assuming you've already +run `go get` or otherwise cloned the repo, is: ``` -go get -u github.com/tendermint/basecoin cd $GOPATH/src/github.com/tendermint/basecoin git checkout develop # (until we release v0.9) make get_vendor_deps