From d435f2991fc0f7749cd9bc9afd2f8f5d6ffbd37f Mon Sep 17 00:00:00 2001 From: Emilien THOMAS Date: Sun, 21 Oct 2018 18:14:13 +0200 Subject: [PATCH] Various fixes on GPIO activity (#304) * Add missing defer rpio.Close() * Fix typo and missing format on invalid method parameter. --- Gopkg.lock | 461 +++++++++++++++++++++++++++++++++++--- activity/gpio/activity.go | 7 +- 2 files changed, 440 insertions(+), 28 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index ee48d4fb..592d492b 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,211 +2,620 @@ [[projects]] + digest = "1:355a000a06dc127c555e408c3778f9968fe4c1680ea6a1c13ba5612274b78551" name = "github.com/Shopify/sarama" packages = ["."] + pruneopts = "" revision = "3b1b38866a79f06deddf0487d5c27ba0697ccd65" version = "v1.15.0" [[projects]] - name = "github.com/Sirupsen/logrus" - packages = ["."] - revision = "d682213848ed68c0a260ca37d6dd5ace8423f5ba" - version = "v1.0.4" + branch = "master" + digest = "1:82de957e2562a4d2176f9caaebc45387845a46a3130c914160177f7ff7f0d50e" + name = "github.com/TIBCOSoftware/flogo-contrib" + packages = [ + "action/flow", + "action/flow/definition", + "action/flow/event", + "action/flow/instance", + "action/flow/linker", + "action/flow/model", + "action/flow/model/simple", + "action/flow/service", + "action/flow/support", + "action/flow/test", + "action/flow/tester", + "action/flow/util", + "activity/aggregate/window", + "activity/aggregate/window/functions", + "activity/aggregate_old/aggregator", + "activity/inference/framework", + "activity/inference/framework/tf", + "activity/inference/model", + "activity/inference/tensorflow/tensorflow/core/example", + "activity/inference/tensorflow/tensorflow/core/framework", + "activity/inference/tensorflow/tensorflow/core/protobuf", + "activity/inference/utils", + "model/simple", + "model/simple/behaviors", + "trigger/cli", + "trigger/lambda", + "trigger/rest/cors", + ] + pruneopts = "" + revision = "6968ae317d9decb89152a4e61c5e15249244c658" [[projects]] + branch = "master" + digest = "1:5a4abe1f05bd2f91764764bbd6e915df0148f0ab738c7c98826ccf5feddaf861" + name = "github.com/TIBCOSoftware/flogo-lib" + packages = [ + "app/resource", + "config", + "core/action", + "core/activity", + "core/data", + "core/event", + "core/mapper", + "core/mapper/assign", + "core/mapper/exprmapper", + "core/mapper/exprmapper/expression", + "core/mapper/exprmapper/expression/direction", + "core/mapper/exprmapper/expression/expr", + "core/mapper/exprmapper/expression/function", + "core/mapper/exprmapper/expression/gocc/errors", + "core/mapper/exprmapper/expression/gocc/lexer", + "core/mapper/exprmapper/expression/gocc/parser", + "core/mapper/exprmapper/expression/gocc/token", + "core/mapper/exprmapper/funcexprtype", + "core/mapper/exprmapper/function/array/length", + "core/mapper/exprmapper/function/number/random", + "core/mapper/exprmapper/function/string/concat", + "core/mapper/exprmapper/function/string/equals", + "core/mapper/exprmapper/function/string/equalsignorecase", + "core/mapper/exprmapper/function/string/length", + "core/mapper/exprmapper/function/string/substring", + "core/mapper/exprmapper/json", + "core/mapper/exprmapper/json/field", + "core/mapper/exprmapper/ref", + "core/trigger", + "engine/channels", + "engine/runner", + "logger", + "util", + "util/managed", + "util/test", + ] + pruneopts = "" + revision = "e41193f633ccf7e9997e4d4a141291ea70356404" + +[[projects]] + digest = "1:8b55da6790eeade578c1fd4ebaa5b0e641072172e1d743f3cb945ae73af463f9" + name = "github.com/aws/aws-lambda-go" + packages = [ + "events", + "lambda", + "lambda/messages", + "lambdacontext", + ] + pruneopts = "" + revision = "2d482ef09017ae953b1e8d5a6ddac5b696663a3c" + version = "v1.6.0" + +[[projects]] + digest = "1:e3f022e81c134e23a7c64af8c23cf125270c54c2b53674d74cf9a9b0d2d5b624" name = "github.com/aws/aws-sdk-go" - packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","internal/shareddefaults","private/protocol","private/protocol/json/jsonutil","private/protocol/jsonrpc","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/restjson","private/protocol/xml/xmlutil","service/lambda","service/sts"] + packages = [ + "aws", + "aws/awserr", + "aws/awsutil", + "aws/client", + "aws/client/metadata", + "aws/corehandlers", + "aws/credentials", + "aws/credentials/ec2rolecreds", + "aws/credentials/endpointcreds", + "aws/credentials/stscreds", + "aws/defaults", + "aws/ec2metadata", + "aws/endpoints", + "aws/request", + "aws/session", + "aws/signer/v4", + "internal/shareddefaults", + "private/protocol", + "private/protocol/json/jsonutil", + "private/protocol/jsonrpc", + "private/protocol/query", + "private/protocol/query/queryutil", + "private/protocol/rest", + "private/protocol/restjson", + "private/protocol/xml/xmlutil", + "service/lambda", + "service/sns", + "service/sts", + ] + pruneopts = "" revision = "726cba4d63d34a7055809986b7942c3eae6c4eb2" version = "v1.12.60" [[projects]] branch = "master" + digest = "1:516fa45784789de393ac6c6153672e6e6a22e5934118b4658df1fa198c9c3326" name = "github.com/carlescere/scheduler" packages = ["."] + pruneopts = "" revision = "ee74d2f83d82cd1d2e92ed3ec3dbaf162ca5ece5" [[projects]] - branch = "master" + digest = "1:0deddd908b6b4b768cfc272c16ee61e7088a60f7fe2f06c547bd3d8e1f8b8e77" name = "github.com/davecgh/go-spew" packages = ["spew"] - revision = "ecdeabc65495df2dec95d7c4a4c3e021903035e5" + pruneopts = "" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" [[projects]] branch = "master" + digest = "1:f1ee55460537958a34c418b3e88b1f4df2fca4b6b31c6fd6609120ad79b14564" name = "github.com/dustin/go-coap" packages = ["."] + pruneopts = "" revision = "ddcc80675fa42611359d91a6dfa5aa57fb90e72b" [[projects]] branch = "master" + digest = "1:07440945d5fea6c91acdfb2c933701818a9931e8e502190dd4b8915fec4af70d" name = "github.com/eapache/go-resiliency" packages = ["breaker"] + pruneopts = "" revision = "ef9aaa7ea8bd2448429af1a77cf41b2b3b34bdd6" [[projects]] branch = "master" + digest = "1:1f7503fa58a852a1416556ae2ddb219b49a1304fd408391948e2e3676514c48d" name = "github.com/eapache/go-xerial-snappy" packages = ["."] + pruneopts = "" revision = "bb955e01b9346ac19dc29eb16586c90ded99a98c" [[projects]] + digest = "1:d8d46d21073d0f65daf1740ebf4629c65e04bf92e14ce93c2201e8624843c3d3" name = "github.com/eapache/queue" packages = ["."] + pruneopts = "" revision = "44cc805cf13205b55f69e14bcb69867d1ae92f98" version = "v1.1.0" [[projects]] branch = "master" - name = "github.com/eawsy/aws-lambda-go-core" - packages = ["service/lambda/runtime"] - revision = "e26eed6aa244a3d45aa693816a9c5faf39390fcd" - -[[projects]] - branch = "master" + digest = "1:4ae0d1e8fb0d25c9e3a7485d7763ef38686db6ed417ead404b9c82e291fe696b" name = "github.com/eclipse/paho.mqtt.golang" - packages = [".","packets"] + packages = [ + ".", + "packets", + ] + pruneopts = "" revision = "750c97f293745e8220737ef933da2ec829d2fddd" [[projects]] + digest = "1:a00483fe4106b86fb1187a92b5cf6915c85f294ed4c129ccbe7cb1f1a06abd46" name = "github.com/go-ini/ini" packages = ["."] + pruneopts = "" revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a" version = "v1.32.0" +[[projects]] + digest = "1:a01080d20c45c031c13f3828c56e58f4f51d926a482ad10cc0316225097eb7ea" + name = "github.com/go-stack/stack" + packages = ["."] + pruneopts = "" + revision = "2fee6af1a9795aafbe0253a0cfbdf668e1fb8a9a" + version = "v1.8.0" + [[projects]] branch = "master" + digest = "1:3b760d3b93f994df8eb1d9ebfad17d3e9e37edcb7f7efaa15b427c0d7a64f4e4" name = "github.com/golang/protobuf" - packages = ["proto","ptypes/any"] + packages = [ + "proto", + "ptypes/any", + ] + pruneopts = "" revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845" [[projects]] branch = "master" + digest = "1:09307dfb1aa3f49a2bf869dcfa4c6c06ecd3c207221bd1c1a1141f0e51f209eb" name = "github.com/golang/snappy" packages = ["."] + pruneopts = "" revision = "553a641470496b2327abcac10b36396bd98e45c9" [[projects]] branch = "master" + digest = "1:b203ef57fe4b479c8c2c3beeb55d79612351e389aa11dd5703eff51d1d50ff6c" name = "github.com/gorilla/websocket" packages = ["."] + pruneopts = "" revision = "292fd08b2560ad524ee37396253d71570339a821" [[projects]] - branch = "master" - name = "github.com/japm/goScript" - packages = ["."] - revision = "caab90145b05376536bbab332312f4812123e197" - -[[projects]] + digest = "1:1eb2106d7753e92412fb74fc1533368c55e507d8fa1bdcbf02cebf5bce2abf71" + name = "github.com/graphql-go/graphql" + packages = [ + ".", + "gqlerrors", + "language/ast", + "language/kinds", + "language/lexer", + "language/location", + "language/parser", + "language/printer", + "language/source", + "language/typeInfo", + "language/visitor", + ] + pruneopts = "" + revision = "5c1be0872a56fba73b279434ea95dfda735abedd" + version = "v0.7.6" + +[[projects]] + digest = "1:6f49eae0c1e5dab1dafafee34b207aeb7a42303105960944828c2079b92fc88e" name = "github.com/jmespath/go-jmespath" packages = ["."] + pruneopts = "" revision = "0b12d6b5" [[projects]] branch = "master" + digest = "1:69089e0eada93b21daf7d6d13e58b02471d5f40ffb2973446a0d375466f4d70c" name = "github.com/julienschmidt/httprouter" packages = ["."] + pruneopts = "" revision = "e1b9828bc9e5904baec057a154c09ca40fe7fae0" [[projects]] + digest = "1:6a874e3ddfb9db2b42bd8c85b6875407c702fa868eed20634ff489bc896ccfd3" + name = "github.com/konsorten/go-windows-terminal-sequences" + packages = ["."] + pruneopts = "" + revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242" + version = "v1.0.1" + +[[projects]] + branch = "master" + digest = "1:b966dfe6f3b204804b5a183cd2be57be3c1f93020ca50573723828f7ecb8863e" + name = "github.com/mongodb/mongo-go-driver" + packages = [ + "bson", + "bson/bsoncodec", + "bson/bsoncore", + "bson/bsonrw", + "bson/bsontype", + "bson/decimal", + "bson/elements", + "bson/objectid", + "bson/parser", + "bson/parser/ast", + "core/address", + "core/auth", + "core/auth/internal/gssapi", + "core/command", + "core/compressor", + "core/connection", + "core/connstring", + "core/description", + "core/dispatch", + "core/event", + "core/option", + "core/readconcern", + "core/readpref", + "core/result", + "core/session", + "core/tag", + "core/topology", + "core/uuid", + "core/version", + "core/wiremessage", + "core/writeconcern", + "internal", + "mongo", + "mongo/aggregateopt", + "mongo/bulkwriteopt", + "mongo/changestreamopt", + "mongo/clientopt", + "mongo/collectionopt", + "mongo/countopt", + "mongo/dbopt", + "mongo/deleteopt", + "mongo/distinctopt", + "mongo/dropcollopt", + "mongo/findopt", + "mongo/indexopt", + "mongo/insertopt", + "mongo/listcollectionopt", + "mongo/listdbopt", + "mongo/mongoopt", + "mongo/replaceopt", + "mongo/runcmdopt", + "mongo/sessionopt", + "mongo/transactionopt", + "mongo/updateopt", + ] + pruneopts = "" + revision = "44d349d1886bcc181046312daee15bb2533a2d10" + +[[projects]] + digest = "1:52b8f1dc01c8a930900aa94e227b0c4c36e7102a5b124687ff1f88a221590234" name = "github.com/pierrec/lz4" packages = ["."] + pruneopts = "" revision = "2fcda4cb7018ce05a25959d2fe08c83e3329f169" version = "v1.1" [[projects]] branch = "master" + digest = "1:e893929e346c3c237e3e5042f5ff84c240a5268a2adb92d4f013b3216242eee2" name = "github.com/pierrec/xxHash" packages = ["xxHash32"] + pruneopts = "" revision = "a0006b13c722f7f12368c00a3d3c2ae8a999a0c6" [[projects]] branch = "master" + digest = "1:256484dbbcd271f9ecebc6795b2df8cad4c458dd0f5fd82a8c2fa0c29f233411" name = "github.com/pmezard/go-difflib" packages = ["difflib"] + pruneopts = "" revision = "792786c7400a136282c1664665ae0a8db921c6c2" +[[projects]] + digest = "1:4ab078f382301235100fc701795c7d10763f17ddda7e1146d8d06792fbe7b137" + name = "github.com/project-flogo/stream" + packages = ["pipeline/support"] + pruneopts = "" + revision = "bd255af992c663ea08388f73c919a2c208efb18e" + version = "v0.1.0" + [[projects]] branch = "master" + digest = "1:00606e8d0c9c0500d09ac0785aebbe51014266088810c7254347b0d048beb29e" name = "github.com/rcrowley/go-metrics" packages = ["."] + pruneopts = "" revision = "e181e095bae94582363434144c61a9653aff6e50" [[projects]] branch = "master" + digest = "1:5760827cb007d2cd3a7bb0e6f19824579251e8797a73ad2451caa769f0e4dbd5" name = "github.com/sfreiberg/gotwilio" packages = ["."] + pruneopts = "" revision = "58125ef28e4b5d7ab5328593099ae8cac5fcf6a2" [[projects]] + digest = "1:5f48b818f16848d05cf74f4cbdd0cbe9e0dcddb3c459b4c510c6e2c8e1b4dff1" + name = "github.com/sirupsen/logrus" + packages = ["."] + pruneopts = "" + revision = "ad15b42461921f1fb3529b058c6786c6a45d5162" + version = "v1.1.1" + +[[projects]] + digest = "1:c2953f7c2e771f25a768b1203e43048d6d2d7bc99f3697be3630bb45d652ed62" name = "github.com/stianeikeland/go-rpio" packages = ["."] + pruneopts = "" revision = "a6b0dffd47b6b1ddf7f1bfe2144f05bf335e911d" version = "4.0.0" [[projects]] + digest = "1:2d0dc026c4aef5e2f3a0e06a4dabe268b840d8f63190cf6894e02134a03f52c5" name = "github.com/stretchr/testify" packages = ["assert"] + pruneopts = "" revision = "b91bfb9ebec76498946beb6af7c0230c7cc7ba6c" version = "v1.2.0" [[projects]] + digest = "1:8b22887c5d7a1c5791882c07bcd949c6e5b1de57190d619a1ab309ad05c76cf3" name = "github.com/tensorflow/tensorflow" packages = ["tensorflow/go"] + pruneopts = "" revision = "438604fc885208ee05f9eef2d0f2c630e1360a83" version = "v1.4.1" [[projects]] branch = "master" + digest = "1:ad74f33a69bd6ab0bd7287003b7c1069b94cfb5213eb5597005fe2963d7dfca9" + name = "github.com/xdg/scram" + packages = ["."] + pruneopts = "" + revision = "7eeb5667e42c09cb51bf7b7c28aea8c56767da90" + +[[projects]] + digest = "1:d110a69f3fba1632d3a543ebfbf9a62ea59bd2cf0c34608975d7e2c761c10edc" + name = "github.com/xdg/stringprep" + packages = ["."] + pruneopts = "" + revision = "bd625b8dc1e3b0f57412280ccbcc317f0c69d8db" + version = "v1.0.0" + +[[projects]] + branch = "master" + digest = "1:43adf91783cc814f60c0dd21c9aadf0b5284721e13542e124536638e0b43a6b3" name = "golang.org/x/crypto" - packages = ["ssh/terminal"] + packages = [ + "pbkdf2", + "ssh/terminal", + ] + pruneopts = "" revision = "13931e22f9e72ea58bb73048bc752b48c6d4d4ac" [[projects]] branch = "master" + digest = "1:f3ee2a699dd02cac37fbca1d028f1121ce0e48143a0f9abd293d3141dcfe6b92" name = "golang.org/x/net" - packages = ["http2","http2/hpack","idna","lex/httplex","proxy","websocket"] + packages = [ + "context", + "http2", + "http2/hpack", + "idna", + "lex/httplex", + "proxy", + "websocket", + ] + pruneopts = "" revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec" [[projects]] branch = "master" + digest = "1:b2ea75de0ccb2db2ac79356407f8a4cd8f798fe15d41b381c00abf3ae8e55ed1" + name = "golang.org/x/sync" + packages = ["semaphore"] + pruneopts = "" + revision = "1d60e4601c6fd243af51cc01ddf169918a5407ca" + +[[projects]] + branch = "master" + digest = "1:b22916910a1104a56a5a64a208de1f3f58e69cde1cca3229f8b54f531df1be69" name = "golang.org/x/sys" - packages = ["unix","windows"] + packages = [ + "unix", + "windows", + ] + pruneopts = "" revision = "810d7000345868fc619eb81f46307107118f4ae1" [[projects]] branch = "master" + digest = "1:9f9562b058a594dae0c8e2388c1a802664111736845bc08885246f0e4bf99bdd" name = "golang.org/x/text" - packages = ["collate","collate/build","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","language","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"] + packages = [ + "collate", + "collate/build", + "internal/colltab", + "internal/gen", + "internal/tag", + "internal/triegen", + "internal/ucd", + "language", + "secure/bidirule", + "transform", + "unicode/bidi", + "unicode/cldr", + "unicode/norm", + "unicode/rangetable", + ] + pruneopts = "" revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3" [[projects]] + digest = "1:44f0ca543a36e98c9a380830fa4e80a256650c23b6759728775c88d2599cdfe1" name = "gopkg.in/couchbase/gocb.v1" packages = ["."] + pruneopts = "" revision = "6019ad1377ffcc81184d2457c065fd72ea7a98dc" version = "v1.3.1" [[projects]] + digest = "1:b184a546c5f5f132c879c72dcefff0b7eb60088d3b47bb7cea95fabc6ee8225e" name = "gopkg.in/couchbase/gocbcore.v7" packages = ["."] + pruneopts = "" revision = "41cd3ec0a0ae9b95eaa730cc715d3599693019c6" version = "v7.0.7" [[projects]] + digest = "1:3515e2101bcd2f1874b89b176092f6fde6a7571ea29454cb0e5655ba36e26eea" name = "gopkg.in/couchbaselabs/gocbconnstr.v1" packages = ["."] + pruneopts = "" revision = "710456e087a6d497e87f41d0a9d98d6a75672186" version = "v1.0.1" [[projects]] + digest = "1:ba6eeb69e706c4fa641a267d608c6daf84cca8dcdf077c71f1c6719eee4e1512" name = "gopkg.in/couchbaselabs/jsonx.v1" packages = ["."] + pruneopts = "" revision = "5b7baa20429a46a5543ee259664cc86502738cad" version = "v1.0.0" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "3a325b2949933146f37b2bc1904fcb72385aab5bec0a5f2f2285ac9307bec5e0" + input-imports = [ + "github.com/Shopify/sarama", + "github.com/TIBCOSoftware/flogo-contrib/action/flow", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/definition", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/event", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/instance", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/linker", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/model", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/model/simple", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/service", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/support", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/test", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/tester", + "github.com/TIBCOSoftware/flogo-contrib/action/flow/util", + "github.com/TIBCOSoftware/flogo-contrib/activity/aggregate/window", + "github.com/TIBCOSoftware/flogo-contrib/activity/aggregate/window/functions", + "github.com/TIBCOSoftware/flogo-contrib/activity/aggregate_old/aggregator", + "github.com/TIBCOSoftware/flogo-contrib/activity/inference/framework", + "github.com/TIBCOSoftware/flogo-contrib/activity/inference/framework/tf", + "github.com/TIBCOSoftware/flogo-contrib/activity/inference/model", + "github.com/TIBCOSoftware/flogo-contrib/activity/inference/tensorflow/tensorflow/core/example", + "github.com/TIBCOSoftware/flogo-contrib/activity/inference/tensorflow/tensorflow/core/framework", + "github.com/TIBCOSoftware/flogo-contrib/activity/inference/tensorflow/tensorflow/core/protobuf", + "github.com/TIBCOSoftware/flogo-contrib/activity/inference/utils", + "github.com/TIBCOSoftware/flogo-contrib/model/simple", + "github.com/TIBCOSoftware/flogo-contrib/model/simple/behaviors", + "github.com/TIBCOSoftware/flogo-contrib/trigger/cli", + "github.com/TIBCOSoftware/flogo-contrib/trigger/lambda", + "github.com/TIBCOSoftware/flogo-contrib/trigger/rest/cors", + "github.com/TIBCOSoftware/flogo-lib/app/resource", + "github.com/TIBCOSoftware/flogo-lib/config", + "github.com/TIBCOSoftware/flogo-lib/core/action", + "github.com/TIBCOSoftware/flogo-lib/core/activity", + "github.com/TIBCOSoftware/flogo-lib/core/data", + "github.com/TIBCOSoftware/flogo-lib/core/event", + "github.com/TIBCOSoftware/flogo-lib/core/mapper", + "github.com/TIBCOSoftware/flogo-lib/core/mapper/exprmapper", + "github.com/TIBCOSoftware/flogo-lib/core/mapper/exprmapper/expression/function", + "github.com/TIBCOSoftware/flogo-lib/core/trigger", + "github.com/TIBCOSoftware/flogo-lib/engine/channels", + "github.com/TIBCOSoftware/flogo-lib/engine/runner", + "github.com/TIBCOSoftware/flogo-lib/logger", + "github.com/TIBCOSoftware/flogo-lib/util", + "github.com/TIBCOSoftware/flogo-lib/util/test", + "github.com/aws/aws-lambda-go/events", + "github.com/aws/aws-lambda-go/lambda", + "github.com/aws/aws-lambda-go/lambdacontext", + "github.com/aws/aws-sdk-go/aws", + "github.com/aws/aws-sdk-go/aws/credentials", + "github.com/aws/aws-sdk-go/aws/session", + "github.com/aws/aws-sdk-go/service/lambda", + "github.com/aws/aws-sdk-go/service/sns", + "github.com/carlescere/scheduler", + "github.com/dustin/go-coap", + "github.com/eclipse/paho.mqtt.golang", + "github.com/golang/protobuf/proto", + "github.com/golang/protobuf/ptypes/any", + "github.com/gorilla/websocket", + "github.com/graphql-go/graphql", + "github.com/julienschmidt/httprouter", + "github.com/mongodb/mongo-go-driver/bson", + "github.com/mongodb/mongo-go-driver/bson/objectid", + "github.com/mongodb/mongo-go-driver/mongo", + "github.com/project-flogo/stream/pipeline/support", + "github.com/sfreiberg/gotwilio", + "github.com/stianeikeland/go-rpio", + "github.com/stretchr/testify/assert", + "github.com/tensorflow/tensorflow/tensorflow/go", + "gopkg.in/couchbase/gocb.v1", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/activity/gpio/activity.go b/activity/gpio/activity.go index 555c6258..4b05de65 100755 --- a/activity/gpio/activity.go +++ b/activity/gpio/activity.go @@ -2,6 +2,7 @@ package gpio import ( "errors" + "fmt" "strings" "github.com/TIBCOSoftware/flogo-lib/core/activity" @@ -72,6 +73,8 @@ func (a *GPIOActivity) Eval(context activity.Context) (done bool, err error) { log.Debugf("Method '%s' and pin number '%d'", methodInput, ivPinNumber) //Open pin openErr := rpio.Open() + defer rpio.Close() + if openErr != nil { log.Errorf("Open RPIO error: %+v", openErr.Error()) return true, errors.New("Open RPIO error: " + openErr.Error()) @@ -128,8 +131,8 @@ func (a *GPIOActivity) Eval(context activity.Context) (done bool, err error) { pin.PullOff() } default: - log.Errorf("Cannot found method %s ", ivmethod) - return true, errors.New("Cannot found method %s " + ivmethod) + log.Errorf("Cannot find method %s ", ivmethod) + return true, errors.New(fmt.Sprintf("Cannot find method %s", ivmethod)) } context.SetOutput(result, 0)