mweagle / Sparta

go microservices, powered by AWS Lambda
https://gosparta.io
MIT License
717 stars 48 forks source link

exit status 2 #102

Closed kkesley closed 6 years ago

kkesley commented 6 years ago

Hi, I'm not sure what's happening here. I am very new to Go but when I run go run main.go --level info describe --out ./graph.html --s3Bucket [bucket_name]

i get, time="2018-02-18T14:41:50+11:00" level=info msg="════════════════════════════════════════════════" time="2018-02-18T14:41:50+11:00" level=info msg="╔═╗┌─┐┌─┐┬─┐┌┬┐┌─┐ Version : 1.0.1" time="2018-02-18T14:41:50+11:00" level=info msg="╚═╗├─┘├─┤├┬┘ │ ├─┤ SHA : b37b93e" time="2018-02-18T14:41:50+11:00" level=info msg="╚═╝┴ ┴ ┴┴└─ ┴ ┴ ┴ Go : go1.10" time="2018-02-18T14:41:50+11:00" level=info msg="════════════════════════════════════════════════" time="2018-02-18T14:41:50+11:00" level=info msg="Service: Hello world go stack" LinkFlags= Option=describe UTC="2018-02-18T03:41:50Z" time="2018-02-18T14:41:50+11:00" level=info msg="════════════════════════════════════════════════" time="2018-02-18T14:41:50+11:00" level=info msg="Provisioning service" BuildID=N/A CodePipelineTrigger= InPlaceUpdates=false NOOP=true Tags= time="2018-02-18T14:41:50+11:00" level=info msg="Verifying IAM Lambda execution roles" time="2018-02-18T14:41:50+11:00" level=info msg="IAM roles verified" Count=1 time="2018-02-18T14:41:50+11:00" level=info msg="Skipping S3 versioning check due to -n/-noop flag" Bucket=golanglambda VersioningEnabled=false time="2018-02-18T14:41:50+11:00" level=info msg="Running go generate" time="2018-02-18T14:41:50+11:00" level=info msg="Compiling binary" Name=Sparta.lambda.amd64 time="2018-02-18T14:41:51+11:00" level=info msg="# hello-world" time="2018-02-18T14:41:51+11:00" level=info msg="usage: link [options] main.o" time="2018-02-18T14:41:51+11:00" level=info msg=" -B note" time="2018-02-18T14:41:51+11:00" level=info msg=" \tadd an ELF NT_GNU_BUILD_ID note when using ELF" time="2018-02-18T14:41:51+11:00" level=info msg=" -D address" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset data segment address (default -1)" time="2018-02-18T14:41:51+11:00" level=info msg=" -E entry" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset entry symbol name" time="2018-02-18T14:41:51+11:00" level=info msg=" -H type" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset header type" time="2018-02-18T14:41:51+11:00" level=info msg=" -I linker" time="2018-02-18T14:41:51+11:00" level=info msg=" \tuse linker as ELF dynamic linker" time="2018-02-18T14:41:51+11:00" level=info msg=" -L directory" time="2018-02-18T14:41:51+11:00" level=info msg=" \tadd specified directory to library path" time="2018-02-18T14:41:51+11:00" level=info msg=" -R quantum" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset address rounding quantum (default -1)" time="2018-02-18T14:41:51+11:00" level=info msg=" -T address" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset text segment address (default -1)" time="2018-02-18T14:41:51+11:00" level=info msg=" -V\tprint version and exit" time="2018-02-18T14:41:51+11:00" level=info msg=" -X definition" time="2018-02-18T14:41:51+11:00" level=info msg=" \tadd string value definition of the form importpath.name=value" time="2018-02-18T14:41:51+11:00" level=info msg=" -a\tdisassemble output" time="2018-02-18T14:41:51+11:00" level=info msg=" -buildid id" time="2018-02-18T14:41:51+11:00" level=info msg=" \trecord id as Go toolchain build id" time="2018-02-18T14:41:51+11:00" level=info msg=" -buildmode mode" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset build mode" time="2018-02-18T14:41:51+11:00" level=info msg=" -c\tdump call graph" time="2018-02-18T14:41:51+11:00" level=info msg=" -cpuprofile file" time="2018-02-18T14:41:51+11:00" level=info msg=" \twrite cpu profile to file" time="2018-02-18T14:41:51+11:00" level=info msg=" -d\tdisable dynamic executable" time="2018-02-18T14:41:51+11:00" level=info msg=" -debugtramp int" time="2018-02-18T14:41:51+11:00" level=info msg=" \tdebug trampolines" time="2018-02-18T14:41:51+11:00" level=info msg=" -dumpdep" time="2018-02-18T14:41:51+11:00" level=info msg=" \tdump symbol dependency graph" time="2018-02-18T14:41:51+11:00" level=info msg=" -extar string" time="2018-02-18T14:41:51+11:00" level=info msg=" \tarchive program for buildmode=c-archive" time="2018-02-18T14:41:51+11:00" level=info msg=" -extld linker" time="2018-02-18T14:41:51+11:00" level=info msg=" \tuse linker when linking in external mode" time="2018-02-18T14:41:51+11:00" level=info msg=" -extldflags flags" time="2018-02-18T14:41:51+11:00" level=info msg=" \tpass flags to external linker" time="2018-02-18T14:41:51+11:00" level=info msg=" -f\tignore version mismatch" time="2018-02-18T14:41:51+11:00" level=info msg=" -g\tdisable go package data checks" time="2018-02-18T14:41:51+11:00" level=info msg=" -h\thalt on error" time="2018-02-18T14:41:51+11:00" level=info msg=" -importcfg file" time="2018-02-18T14:41:51+11:00" level=info msg=" \tread import configuration from file" time="2018-02-18T14:41:51+11:00" level=info msg=" -installsuffix suffix" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset package directory suffix" time="2018-02-18T14:41:51+11:00" level=info msg=" -k symbol" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset field tracking symbol" time="2018-02-18T14:41:51+11:00" level=info msg=" -libgcc string" time="2018-02-18T14:41:51+11:00" level=info msg=" \tcompiler support lib for internal linking; use \"none\" to disable" time="2018-02-18T14:41:51+11:00" level=info msg=" -linkmode mode" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset link mode" time="2018-02-18T14:41:51+11:00" level=info msg=" -linkshared" time="2018-02-18T14:41:51+11:00" level=info msg=" \tlink against installed Go shared libraries" time="2018-02-18T14:41:51+11:00" level=info msg=" -memprofile file" time="2018-02-18T14:41:51+11:00" level=info msg=" \twrite memory profile to file" time="2018-02-18T14:41:51+11:00" level=info msg=" -memprofilerate rate" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset runtime.MemProfileRate to rate" time="2018-02-18T14:41:51+11:00" level=info msg=" -msan" time="2018-02-18T14:41:51+11:00" level=info msg=" \tenable MSan interface" time="2018-02-18T14:41:51+11:00" level=info msg=" -n\tdump symbol table" time="2018-02-18T14:41:51+11:00" level=info msg=" -o file" time="2018-02-18T14:41:51+11:00" level=info msg=" \twrite output to file" time="2018-02-18T14:41:51+11:00" level=info msg=" -pluginpath string" time="2018-02-18T14:41:51+11:00" level=info msg=" \tfull path name for plugin" time="2018-02-18T14:41:51+11:00" level=info msg=" -r path" time="2018-02-18T14:41:51+11:00" level=info msg=" \tset the ELF dynamic linker search path to dir1:dir2:..." time="2018-02-18T14:41:51+11:00" level=info msg=" -race" time="2018-02-18T14:41:51+11:00" level=info msg=" \tenable race detector" time="2018-02-18T14:41:51+11:00" level=info msg=" -s\tdisable symbol table" time="2018-02-18T14:41:51+11:00" level=info msg=" -tmpdir directory" time="2018-02-18T14:41:51+11:00" level=info msg=" \tuse directory for temporary files" time="2018-02-18T14:41:51+11:00" level=info msg=" -u\treject unsafe packages" time="2018-02-18T14:41:51+11:00" level=info msg=" -v\tprint link trace" time="2018-02-18T14:41:51+11:00" level=info msg=" -w\tdisable DWARF generation" time="2018-02-18T14:41:51+11:00" level=info msg="Invoking rollback functions" Usage: C:\Users\KENDRI~1\AppData\Local\Temp\go-build691522662\b001\exe\main.exe describe [flags]

Flags: -h, --help help for describe -o, --out string Output file for HTML description -s, --s3Bucket string S3 Bucket to use for Lambda source

Global Flags: -f, --format string Log format [text, json] (default "text") --ldflags string Go linker string definition flags (https://golang.org/cmd/link/) -l, --level string Log level [panic, fatal, error, warn, info, debug] (default "info") -n, --noop Dry-run behavior only (do not perform mutations) -t, --tags string Optional build tags for conditional compilation

time="2018-02-18T14:41:51+11:00" level=error msg="exit status 2"

I am not sure what's happening. I have go version of

go version go1.10 windows/amd64

I'm not sure if it's my GOPATH but I'm pointing the go path to c:\documents\go and the project is on c:\documents\go\src\my-project

kkesley commented 6 years ago

I'm sorry, this is entirely my fault. I used a space in the first sparta.Main function which is not allowed in cloudformation naming convention. After I used a proper naming (without space) I can deploy the function successfully. I'm closing the issue. Sorry.