From e7b60556937f28d95ce8fc2752ffefc9c73d5b1d Mon Sep 17 00:00:00 2001 From: Suraj Date: Mon, 1 Feb 2016 20:04:19 +0530 Subject: [PATCH] added file level comments --- config/config.go | 7 +++++++ db/files.go | 3 +++ db/tasks.go | 7 +++++++ types/types.go | 4 ++++ views/addViews.go | 3 +++ views/deleteViews.go | 4 ++++ views/otherViews.go | 4 ++++ 7 files changed, 32 insertions(+) diff --git a/config/config.go b/config/config.go index 63d82d3..d791d2f 100644 --- a/config/config.go +++ b/config/config.go @@ -1,3 +1,10 @@ +/* +Configuration package is used to read the configuration file +config.json which stores the server port for current implementation + { + "ServerPort": ":8081" + } +*/ package config import ( diff --git a/db/files.go b/db/files.go index 3c549e4..0c65159 100644 --- a/db/files.go +++ b/db/files.go @@ -1,5 +1,8 @@ package db +/* +stores the functions related to file IO +*/ import ( "log" ) diff --git a/db/tasks.go b/db/tasks.go index 5f0b49e..9a45cb6 100644 --- a/db/tasks.go +++ b/db/tasks.go @@ -1,5 +1,12 @@ package db +/* +Stores the database functions related to tasks like +GetTaskByID(id int) +GetTasks(status string) +DeleteAll() +*/ + import ( "database/sql" "log" diff --git a/types/types.go b/types/types.go index 06e11c2..034678f 100644 --- a/types/types.go +++ b/types/types.go @@ -1,5 +1,9 @@ package types +/* +Package types is used to store the context struct which +is passed while templates are executed. +*/ //Task is the struct used to identify tasks type Task struct { Id int diff --git a/views/addViews.go b/views/addViews.go index 995d637..115759d 100644 --- a/views/addViews.go +++ b/views/addViews.go @@ -1,5 +1,8 @@ package views +/* +Holds the insert task related view handlers, includes the one for file upload +*/ import ( "crypto/md5" "fmt" diff --git a/views/deleteViews.go b/views/deleteViews.go index 945ecde..78e0f9e 100644 --- a/views/deleteViews.go +++ b/views/deleteViews.go @@ -1,5 +1,9 @@ package views +/* +Holds the delete related view handlers +*/ + import ( "log" "net/http" diff --git a/views/otherViews.go b/views/otherViews.go index 0ef9cc2..4719de5 100644 --- a/views/otherViews.go +++ b/views/otherViews.go @@ -1,5 +1,9 @@ package views +/* +Holds the non insert/update/delete related view handlers +*/ + import ( "io/ioutil" "log"