Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Jul 10, 2016
1 parent 7998c2f commit c57a876
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ go-ltsv
=======

[![Build Status](https://travis-ci.org/Songmu/go-ltsv.png?branch=master)][travis]
[![Coverage Status](https://coveralls.io/repos/Songmu/go-ltsv/badge.png?branch=master)][coveralls]
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]
[![GoDoc](https://godoc.org/github.com/Songmu/go-ltsv?status.svg)][godoc]

Expand Down
1 change: 1 addition & 0 deletions decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"
)

// Unmarshaler is the interface implemented by types that can unmarshal a ltsv
type Unmarshaler interface {
UnmarshalLTSV([]byte) error
}
Expand Down
2 changes: 2 additions & 0 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"
)

// Marshaler is the interface inmpemented by types that can marshal themselves
type Marshaler interface {
MarshalLTSV() ([]byte, error)
}
Expand Down Expand Up @@ -44,6 +45,7 @@ func (e *MarshalTypeError) Error() string {
return "ltsv: cannot marshal Go value " + e.Value + " of type " + e.Type.String() + " into ltsv"
}

// Marshal returns the LTSV encoding of v
func Marshal(v interface{}) ([]byte, error) {
rv := reflect.ValueOf(v)
if rv.Kind() == reflect.Ptr {
Expand Down

0 comments on commit c57a876

Please sign in to comment.