From 75abc628fe41bc67c787f79103c8d72e539a9fb2 Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Wed, 19 Oct 2016 20:39:44 +0800 Subject: [PATCH] Update godoc of package. --- cell.go | 2 +- excelize.go | 12 ++++++------ file.go | 2 +- lib.go | 12 ++++++------ sheet.go | 16 ++++++++-------- templates.go | 2 +- xmlContentTypes.go | 2 +- xmlSharedStrings.go | 2 +- xmlWorkbook.go | 4 ++-- xmlWorksheet.go | 4 ++-- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/cell.go b/cell.go index df2d13b..ef0a4f8 100644 --- a/cell.go +++ b/cell.go @@ -6,7 +6,7 @@ import ( "strings" ) -// GetCellValue provide function get value from cell by given sheet index and axis in XLSX file +// GetCellValue provide function get value from cell by given sheet index and axis in XLSX file. func (f *File) GetCellValue(sheet string, axis string) string { axis = strings.ToUpper(axis) var xlsx xlsxWorksheet diff --git a/excelize.go b/excelize.go index 71df327..33e2449 100644 --- a/excelize.go +++ b/excelize.go @@ -34,7 +34,7 @@ func OpenFile(filename string) (*File, error) { }, nil } -// SetCellValue provide function to set int or string type value of a cell +// SetCellValue provide function to set int or string type value of a cell. func (f *File) SetCellValue(sheet string, axis string, value interface{}) { switch t := value.(type) { case int, int8, int16, int32, int64, float32, float64: @@ -48,7 +48,7 @@ func (f *File) SetCellValue(sheet string, axis string, value interface{}) { } } -// SetCellInt provide function to set int type value of a cell +// SetCellInt provide function to set int type value of a cell. func (f *File) SetCellInt(sheet string, axis string, value int) { axis = strings.ToUpper(axis) var xlsx xlsxWorksheet @@ -73,7 +73,7 @@ func (f *File) SetCellInt(sheet string, axis string, value int) { f.saveFileList(name, replaceRelationshipsID(replaceWorkSheetsRelationshipsNameSpace(string(output)))) } -// SetCellStr provide function to set string type value of a cell +// SetCellStr provide function to set string type value of a cell. func (f *File) SetCellStr(sheet string, axis string, value string) { axis = strings.ToUpper(axis) var xlsx xlsxWorksheet @@ -98,7 +98,7 @@ func (f *File) SetCellStr(sheet string, axis string, value string) { f.saveFileList(name, replaceRelationshipsID(replaceWorkSheetsRelationshipsNameSpace(string(output)))) } -// Completion column element tags of XML in a sheet +// Completion column element tags of XML in a sheet. func completeCol(xlsx xlsxWorksheet, row int, cell int) xlsxWorksheet { if len(xlsx.SheetData.Row) < cell { for i := len(xlsx.SheetData.Row); i < cell; i++ { @@ -124,7 +124,7 @@ func completeCol(xlsx xlsxWorksheet, row int, cell int) xlsxWorksheet { return xlsx } -// Completion row element tags of XML in a sheet +// Completion row element tags of XML in a sheet. func completeRow(xlsx xlsxWorksheet, row int, cell int) xlsxWorksheet { if len(xlsx.SheetData.Row) < row { for i := len(xlsx.SheetData.Row); i < row; i++ { @@ -150,7 +150,7 @@ func completeRow(xlsx xlsxWorksheet, row int, cell int) xlsxWorksheet { return xlsx } -// Replace xl/worksheets/sheet%d.xml XML tags to self-closing for compatible Office Excel 2007 +// Replace xl/worksheets/sheet%d.xml XML tags to self-closing for compatible Office Excel 2007. func replaceWorkSheetsRelationshipsNameSpace(workbookMarshal string) string { oldXmlns := `` newXmlns := `` diff --git a/file.go b/file.go index e3af5ca..979f5e1 100644 --- a/file.go +++ b/file.go @@ -6,7 +6,7 @@ import ( "os" ) -// CreateFile provide function to create new file by default template +// CreateFile provide function to create new file by default template. // For example: // xlsx := CreateFile() func CreateFile() *File { diff --git a/lib.go b/lib.go index 8030601..03fc8f2 100644 --- a/lib.go +++ b/lib.go @@ -39,7 +39,7 @@ func ReadZipReader(r *zip.Reader) (map[string]string, int, error) { return fileList, worksheets, nil } -// Read XML content as string and replace drawing property in XML namespace of sheet +// Read XML content as string and replace drawing property in XML namespace of sheet. func (f *File) readXML(name string) string { if content, ok := f.XLSX[name]; ok { return strings.Replace(content, ``, ` />`, -1) diff --git a/templates.go b/templates.go index c6b748c..3691f39 100644 --- a/templates.go +++ b/templates.go @@ -3,7 +3,7 @@ package excelize -// XMLHeader define an XML declaration can also contain a standalone declaration +// XMLHeader define an XML declaration can also contain a standalone declaration. const XMLHeader = "\n" const templateDocpropsApp = ` diff --git a/xmlContentTypes.go b/xmlContentTypes.go index 86f3b44..b56c125 100644 --- a/xmlContentTypes.go +++ b/xmlContentTypes.go @@ -1,4 +1,4 @@ -// Some code of this file reference tealeg/xlsx +// Some code of this file reference tealeg/xlsx. package excelize diff --git a/xmlSharedStrings.go b/xmlSharedStrings.go index f429460..467f19c 100644 --- a/xmlSharedStrings.go +++ b/xmlSharedStrings.go @@ -1,4 +1,4 @@ -// Some code of this file reference tealeg/xlsx +// Some code of this file reference tealeg/xlsx. package excelize diff --git a/xmlWorkbook.go b/xmlWorkbook.go index 6fe8f37..a82052f 100644 --- a/xmlWorkbook.go +++ b/xmlWorkbook.go @@ -1,4 +1,4 @@ -// Some code of this file reference tealeg/xlsx +// Some code of this file reference tealeg/xlsx. package excelize @@ -44,7 +44,7 @@ type xlsxWorkbook struct { FileRecoveryPr xlsxFileRecoveryPr `xml:"fileRecoveryPr"` } -// xlsxFileRecoveryPr maps sheet recovery information +// xlsxFileRecoveryPr maps sheet recovery information. type xlsxFileRecoveryPr struct { RepairLoad int `xml:"repairLoad,attr"` } diff --git a/xmlWorksheet.go b/xmlWorksheet.go index 1fd1781..b83eaa9 100644 --- a/xmlWorksheet.go +++ b/xmlWorksheet.go @@ -1,4 +1,4 @@ -// Some code of this file reference tealeg/xlsx +// Some code of this file reference tealeg/xlsx. package excelize @@ -26,7 +26,7 @@ type xlsxWorksheet struct { Drawing xlsxDrawing `xml:"drawing"` } -// xlsxDrawing change r:id to rid in the namespace +// xlsxDrawing change r:id to rid in the namespace. type xlsxDrawing struct { RID string `xml:"rid,attr"` } -- GitLab