From c57a87634257a1577c7cf2160ecababcd55c6b4f Mon Sep 17 00:00:00 2001 From: Songmu Date: Sun, 10 Jul 2016 18:21:32 +0900 Subject: [PATCH] lint --- README.md | 1 + decode.go | 1 + encode.go | 2 ++ 3 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 98acb6b..178d008 100644 --- a/README.md +++ b/README.md @@ -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] diff --git a/decode.go b/decode.go index ac1e056..221cc88 100644 --- a/decode.go +++ b/decode.go @@ -8,6 +8,7 @@ import ( "strings" ) +// Unmarshaler is the interface implemented by types that can unmarshal a ltsv type Unmarshaler interface { UnmarshalLTSV([]byte) error } diff --git a/encode.go b/encode.go index 6b85e7b..52e913b 100644 --- a/encode.go +++ b/encode.go @@ -8,6 +8,7 @@ import ( "strings" ) +// Marshaler is the interface inmpemented by types that can marshal themselves type Marshaler interface { MarshalLTSV() ([]byte, error) } @@ -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 {