MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / apisFromDAO

Method apisFromDAO

internal/repository/api.go:122–133  ·  view source on GitHub ↗

apisFromDAO 将DAO层的API对象列表转换为domain层对象列表

(apis []*dao.Api)

Source from the content-addressed store, hash-verified

120
121// apisFromDAO 将DAO层的API对象列表转换为domain层对象列表
122func (a *apiRepository) apisFromDAO(apis []*dao.Api) []*domain.Api {
123 if apis == nil {
124 return nil
125 }
126 result := make([]*domain.Api, 0, len(apis))
127 for _, api := range apis {
128 if api != nil {
129 result = append(result, a.apiFromDAO(api))
130 }
131 }
132 return result
133}

Callers 1

ListApisMethod · 0.95

Calls 1

apiFromDAOMethod · 0.95

Tested by

no test coverage detected