diff options
| author | xuri <xuri.me@gmail.com> | 2018-09-12 15:47:56 +0800 |
|---|---|---|
| committer | xuri <xuri.me@gmail.com> | 2018-09-12 15:47:56 +0800 |
| commit | b4a6e61ec34d4a0db1110907cc969f0d7d38991a (patch) | |
| tree | 3200bb65c2f0c58ef009c9b151801dc14f16faf0 /sheet.go | |
| parent | 99c9d04f67c0c835b5d884ac229b1883afbb9d03 (diff) | |
Fix golint errors under confidence 0.1
Diffstat (limited to 'sheet.go')
| -rw-r--r-- | sheet.go | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,11 @@ +// Package excelize providing a set of functions that allow you to write to +// and read from XLSX files. Support reads and writes XLSX file generated by +// Microsoft Excelâ„¢ 2007 and later. Support save file without losing original +// charts of XLSX. This library needs Go version 1.8 or later. +// +// Copyright 2016 - 2018 The excelize Authors. All rights reserved. Use of +// this source code is governed by a BSD-style license that can be found in +// the LICENSE file. package excelize import ( @@ -371,7 +379,7 @@ func (f *File) SetSheetBackground(sheet, picture string) error { } ext, ok := supportImageTypes[path.Ext(picture)] if !ok { - return errors.New("Unsupported image extension") + return errors.New("unsupported image extension") } pictureID := f.countMedia() + 1 rID := f.addSheetRelationships(sheet, SourceRelationshipImage, "../media/image"+strconv.Itoa(pictureID)+ext, "") @@ -441,7 +449,7 @@ func (f *File) deleteSheetFromContentTypes(target string) { // func (f *File) CopySheet(from, to int) error { if from < 1 || to < 1 || from == to || f.GetSheetName(from) == "" || f.GetSheetName(to) == "" { - return errors.New("Invalid worksheet index") + return errors.New("invalid worksheet index") } f.copySheet(from, to) return nil |
