func (m *IssueManager) Create(raw *issue.TargetIssue) (*issue.TargetIssue, error) { // TODO (m0sth8): add validation raw.Id = bson.NewObjectId() raw.Created = time.Now().UTC() raw.Updated = raw.Created if err := m.col.Insert(raw); err != nil { return nil, err } return raw, nil }