Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions models/cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Cell struct {
Style *Style `json:"style,omitempty"`
}

// Style represent json model Data
// Style represent JSON model Data
type Style struct {
Border []*Border `json:"border,omitempty"`
Fill *Fill `json:"fill,omitempty"`
Expand All @@ -15,13 +15,13 @@ type Style struct {
Protection *Protection `json:"protection,omitempty"`
}

//Protection represent a json cell style model
//Protection represent a JSON cell style model
type Protection struct {
Hidden bool `json:"hidden,omitempty"`
Locked bool `json:"locked,omitempty"`
}

//Font represent a json cell style model
//Font represent a JSON cell style model
type Font struct {
Bold bool `json:"bold,omitempty"`
Italic bool `json:"italic,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
httpSwagger "github.com/swaggo/http-swagger"
)

// CreateRouter create Excelante API routes
// CreateRouter create every Excelante API routes and serve it to a given port
func CreateRouter() {
router := mux.NewRouter()
APIRouter := router.PathPrefix("/api/v1").Subrouter()
Expand Down
1 change: 0 additions & 1 deletion router/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/gorilla/mux"
)

// CreateWriterRouter create writer routes and dispatch http method post to handler
func createWriterRouter(router *mux.Router) {
writerRouter := router.PathPrefix("/write").Subrouter()

Expand Down
12 changes: 12 additions & 0 deletions services/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ import (
)

// Output is a generic type used by Excel reading functions
// For example:
//
// map[
// Feuil1:
// map[
// %!s(int=1): [Cell A1 Cell B1]
// %!s(int=2): [Cell A2 Cell B2]
// %!s(int=3): [Cell A3 Cell B3]
// %!s(int=4): [N/A Cell B4]
// %!s(int=5): [Cell A5 Cell B5]
// ]
// ]
type Output map[string]map[int]interface{}

// ReadLines read all lines of a given Excel file
Expand Down
1 change: 1 addition & 0 deletions services/sheet.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type File struct {
}

// WriteSheets write a sheets into a given Excel file
// It also delete the default "Sheet1" sheet after writing every sheets
func (file *File) WriteSheets(sheets []*models.Sheet) {
for _, sheet := range sheets {
file.writeSheet(sheet)
Expand Down