-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcopygen.go
More file actions
26 lines (21 loc) · 719 Bytes
/
copygen.go
File metadata and controls
26 lines (21 loc) · 719 Bytes
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
// Code generated by github.com/switchupcb/copygen
// DO NOT EDIT.
// Package copygen contains the setup information for copygen generated code.
package copygen
import (
c "strconv"
"github.com/switchupcb/copygen/examples/map/domain"
"github.com/switchupcb/copygen/examples/map/models"
)
/* Define the function and field this converter is applied to using regex. */
// Itoa converts an integer to an ascii value.
func Itoa(i int) string {
return c.Itoa(i)
}
// ModelsToDomain copies a *models.Account, *models.User to a *domain.Account.
func ModelsToDomain(tA *domain.Account, fA *models.Account, fU *models.User) {
// *domain.Account fields
tA.ID = Itoa(fU.UserID)
tA.Name = fA.Name
tA.Email = fA.Email
}