소스 검색

Add CompleteName helper

Andrea Fazzi 6 년 전
부모
커밋
25ed2837f5
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      orm/teacher.go

+ 5 - 0
orm/teacher.go

@@ -1,6 +1,7 @@
 package orm
 
 import (
+	"fmt"
 	"net/http"
 
 	"github.com/jinzhu/gorm"
@@ -242,3 +243,7 @@ func (t Teacher) IsCoordinatorInClass(className string) bool {
 	return false
 
 }
+
+func (t *Teacher) CompleteName() string {
+	return fmt.Sprintf("%s %s", t.Name, t.Surname)
+}