You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
391 B
Go
18 lines
391 B
Go
2 years ago
|
package converter
|
||
|
|
||
|
import "github.com/ajikamaludin/go-fiber-rest/app/models"
|
||
|
|
||
|
func MapNoteToNoteRes(notes []models.Note) (noteRes []models.NoteRes) {
|
||
|
for _, v := range notes {
|
||
|
noteRes = append(noteRes, *v.ToNoteRes())
|
||
|
}
|
||
|
return
|
||
|
}
|
||
|
|
||
|
func MapUserToUserRes(users []models.User) (userRes []models.UserRes) {
|
||
|
for _, v := range users {
|
||
|
userRes = append(userRes, *v.ToUserRes())
|
||
|
}
|
||
|
return
|
||
|
}
|