Skip to content

Commit

Permalink
Merge pull request #7 from nabeken/attributes-binary
Browse files Browse the repository at this point in the history
move to Github Actions and add Binary support
  • Loading branch information
nabeken authored Aug 6, 2021
2 parents efc666d + bbc1892 commit 2047b09
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 23 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Go

on:
- push
- pull_request

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Setup DynamoDB Local
uses: rrainn/[email protected]
with:
port: 18000
cors: '*'

- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: ^1.16.6
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v ./...

- name: Test
run: go test -v -cover ./...
env:
AWS_REGION: local
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# aws-go-dynamodb

[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/nabeken/aws-go-dynamodb/table)
[![Build Status](https://img.shields.io/travis/nabeken/aws-go-dynamodb/master.svg)](https://travis-ci.org/nabeken/aws-go-dynamodb)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/nabeken/aws-go-dynamodb)](https://pkg.go.dev/github.com/nabeken/aws-go-dynamodb)
[![Go](https://github.com/nabeken/aws-go-dynamodb/actions/workflows/go.yml/badge.svg)](https://github.com/nabeken/aws-go-dynamodb/actions/workflows/go.yml)
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nabeken/aws-go-dynamodb/blob/master/LICENSE)

aws-go-dynamodb is a Amazon DynamoDB library built with [aws/aws-sdk-go](https://github.com/aws/aws-sdk-go).
Expand Down
7 changes: 7 additions & 0 deletions attributes/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ func Number(v int64) *dynamodb.AttributeValue {
N: &n,
}
}

// Binary returns dynamodb.AttributeValue for Binary.
func Binary(b []byte) *dynamodb.AttributeValue {
return &dynamodb.AttributeValue{
B: b,
}
}

0 comments on commit 2047b09

Please sign in to comment.