-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
61 lines (46 loc) · 1.37 KB
/
main.go
File metadata and controls
61 lines (46 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main
import "geektrust/mappings"
// "bufio"
// "geektrust/course"
// "geektrust/types"
// "log"
// "os"
// "strings"
func main() {
mappings.CreateUrlMappings()
mappings.Router.Run(":5000")
// defer (func() {
// recover()
// })()
// reads the arguments passed from command line for execution
// cliArgs := os.Args[1:]
// if len(cliArgs) == 0 {
// fmt.Println("Please provide the input file path")
// return
// }
// opens the file provides as first argument of command in shell
// filePath := cliArgs[0]
// file, err := os.Open("sample_input/input1.txt")
// if err != nil {
// fmt.Println("Error opening the input file")
// return
// }
// defer file.Close()
// scanner := bufio.NewScanner(file)
/*
Initializing maps(courseEmployeeRegMap)for mapping CourseOfferingId with its course data and Registered Employees,
Similary for (courseRegIdMap) Employee course registration Id with CourseOfferingId
*/
// var courses []types.Course
// courseEmployeeRegMap := make(map[string]types.CourseData)
// courseRegIdMap := make(map[string]string)
// for scanner.Scan() {
// args := scanner.Text()
// argList := strings.Fields(args)
// //Executes the commands passed in the arguments
// course.ExecuteCommandsFactory(argList, &courses, courseEmployeeRegMap, courseRegIdMap)
// }
// if err := scanner.Err(); err != nil {
// log.Fatal(err)
// }
}