Skip to content

Commit

Permalink
Merge 3bd5bb6 into b6654cc
Browse files Browse the repository at this point in the history
  • Loading branch information
ifraixedes committed Mar 12, 2018
2 parents b6654cc + 3bd5bb6 commit e9fef0c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ GOFILES_NOVENDOR := $(shell find . -type f -name '*.go' -not -path "./vendor/*"
get-deps:
go get -t ./...
go get golang.org/x/tools/cmd/goimports
go get -u golang.org/x/lint/golint

.PHONY: clean
clean:
Expand All @@ -25,7 +26,7 @@ $(COVFILE):
go test $(PKG) -covermode=count -coverprofile=$(COVFILE)

.PHONY: travis-ci
travis-ci: test vetcheck fmtcheck cov
travis-ci: test vetcheck fmtcheck lintcheck cov

.PHONY: test
test:
Expand All @@ -47,3 +48,12 @@ else
@echo -e "error\tsome files did not pass go vet\n"
@go tool vet -all -shadow=true . 2>&1
endif

.PHONY: lintcheck
lintcheck:
ifeq ($(shell golint 2>&1 | wc -l), 0)
@printf "ok\tall files passed golint\n"
else
@echo -e "error\tsome files did not pass golint\n"
@golint 2>&1
endif
4 changes: 2 additions & 2 deletions connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ type AWSReader interface {
func NewAWSReader(
ctx context.Context, accessKey string, secretKey string, regions []string, config *aws.Config,
) (AWSReader, error) {
var c connector = connector{}
var c = connector{}

creds, ec2s, sts, err := configureAWS(accessKey, secretKey)
if err != nil {
Expand Down Expand Up @@ -224,7 +224,7 @@ func configureAWS(accessKey string, secretKey string) (*credentials.Credentials,
* not try to establish any connections with AWS services.
*/
const defaultRegion string = "eu-west-1"
var token string = ""
var token = ""

creds := credentials.NewStaticCredentials(accessKey, secretKey, token)
_, err := creds.Get()
Expand Down
16 changes: 11 additions & 5 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
/*
Package raws
Package raws currently provides simplicity - one package vs multitude in AWS -
as well as multi-region management - all calls are done for each selected region(s).
Region's parameter also supports globbing, thus allowing to fetch data from all
eu with: 'eu-*' or all eu-west with 'eu-west-*'
Raws currently provides simplicity - one package vs multitude in AWS - as well as multi-region management - all calls are done for each selected region(s). Region's parameter also supports globbing, thus allowing to fetch data from all eu with: 'eu-*' or all eu-west with 'eu-west-*'
Currently only a couple of the most used information is gathered, but adding extra
calls should not be complicated, as they all have the same logic.
Currently only a couple of the most used information is gathered, but adding extra calls should not be complicated, as they all have the same logic.
For the sake of avoiding repetitive documentation, each function that this package contains with the context.Context type as a first parameter, won't be documented, at least if there is not special usage of it inside of the function, because the context.Context is provided for implementing the most adopted concurrency pattern, used by the Go community (see https://blog.golang.org/context).
For the sake of avoiding repetitive documentation, each function that this package
contains with the context.Context type as a first parameter, won't be documented,
at least if there is not special usage of it inside of the function, because the
context.Context is provided for implementing the most adopted concurrency pattern,
used by the Go community (see https://blog.golang.org/context).
*/
package raws

0 comments on commit e9fef0c

Please sign in to comment.