Преглед изворни кода

Improved file.AddSheet documentation

Added the sheet name length check to function description.
Michael Vlaar пре 7 година
родитељ
комит
ca913a6535
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      file.go

+ 2 - 1
file.go

@@ -150,7 +150,8 @@ func (f *File) Write(writer io.Writer) (err error) {
 	return zipWriter.Close()
 }
 
-// Add a new Sheet, with the provided name, to a File
+// Add a new Sheet, with the provided name, to a File. 
+// The maximum sheet name length is 30 characters. If the sheet name length is exceeded an error is thrown
 func (f *File) AddSheet(sheetName string) (*Sheet, error) {
 	if _, exists := f.Sheet[sheetName]; exists {
 		return nil, fmt.Errorf("duplicate sheet name '%s'.", sheetName)