Dmitry Yu Okunev лет назад: 6
Родитель
Сommit
1559ceac09
3 измененных файлов с 11 добавлено и 11 удалено
  1. 1 0
      .gitignore
  2. 3 4
      api11/person.go
  3. 7 7
      api11/personId.go

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+*_reform.go

+ 3 - 4
api11/person.go

@@ -7,7 +7,7 @@ import (
 	"html/template"
 )
 
-//reform:face
+//reform:person
 type Person struct {
 	PersonId
 	Fullname    string      `reform:"fullname"      view:"readonly"`
@@ -21,12 +21,11 @@ type People []Person
 func (people Person) GetMaps() (result PersonIdsData) {
 	personIdPtrs := PersonIdPtrs{}
 
-	for idx, _ := range people {
+	for idx := range people {
 		person := &people[idx]
 		person.person = person
 		personIdPtrs = append(personIdPtrs, &person.PersonId)
 	}
 
-	return personIdPtrs;
+	return personIdPtrs
 }
-

+ 7 - 7
api11/personId.go

@@ -7,7 +7,7 @@ import (
 	"html/template"
 )
 
-type StaffStatus   int
+type StaffStatus int
 type StudentStatus int
 
 //reform:person_ids
@@ -51,13 +51,13 @@ func (personId PersonId) GetPerson() *Person {
 func (personIds PersonIdPtrs) GetMaps() (result PersonIdsData) {
 	result.personIds = PersonIdsData
 
-	result.idMap            = map[int]*PersonId{}
-	result.empGUIDMap       = map[int]*PersonId{}
-	result.staffIdMap       = map[int]*PersonId{}
-	result.studentIdMap     = map[int]*PersonId{}
-	result.learndepIdMap    = map[int]*PersonId{}
+	result.idMap = map[int]*PersonId{}
+	result.empGUIDMap = map[int]*PersonId{}
+	result.staffIdMap = map[int]*PersonId{}
+	result.studentIdMap = map[int]*PersonId{}
+	result.learndepIdMap = map[int]*PersonId{}
 	result.recordBookNumMap = map[int]*PersonId{}
-	result.physGuardIdMap   = map[int]*PersonId{}
+	result.physGuardIdMap = map[int]*PersonId{}
 
 	for _, personId := range result.personIds {
 		result.idMap[personId.Id] = personId