From 53e9106b0920e11117c52f015847308cb9d33b28 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 23 Oct 2017 22:22:30 +0200 Subject: [PATCH] Start working to compile eyes app --- Makefile | 4 +++- examples/eyes/cmd/eyes/main.go | 16 ++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 1259247636..4462ce055e 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,9 @@ GOTOOLS = github.com/mitchellh/gox \ github.com/rigelrozanski/shelldown/cmd/shelldown TUTORIALS=$(shell find docs/guide -name "*md" -type f) -EXAMPLES := counter eyes basecoin +# EXAMPLES := counter eyes basecoin +EXAMPLES := eyes + INSTALL_EXAMPLES := $(addprefix install_,${EXAMPLES}) TEST_EXAMPLES := $(addprefix testex_,${EXAMPLES}) diff --git a/examples/eyes/cmd/eyes/main.go b/examples/eyes/cmd/eyes/main.go index ed9b406ef3..389950d0a4 100644 --- a/examples/eyes/cmd/eyes/main.go +++ b/examples/eyes/cmd/eyes/main.go @@ -8,10 +8,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk" client "github.com/cosmos/cosmos-sdk/client/commands" - "github.com/cosmos/cosmos-sdk/modules/base" "github.com/cosmos/cosmos-sdk/modules/eyes" "github.com/cosmos/cosmos-sdk/server/commands" - "github.com/cosmos/cosmos-sdk/stack" + "github.com/cosmos/cosmos-sdk/util" ) // RootCmd is the entry point for this binary @@ -23,14 +22,11 @@ var RootCmd = &cobra.Command{ // BuildApp constructs the stack we want to use for this app func BuildApp() sdk.Handler { - return stack.New( - base.Logger{}, - stack.Recovery{}, - ). - // We do this to demo real usage, also embeds it under it's own namespace - Dispatch( - stack.WrapHandler(eyes.NewHandler()), - ) + return sdk.ChainDecorators( + util.Logger{}, + util.Recovery{}, + ).WithHandler( + eyes.NewHandler()) } func main() {