| 40 | type DsdxDependencies map[string][]string |
| 41 | |
| 42 | func NewDsdxDocument(name, creator string) *DsdxDocument { |
| 43 | version := "DSDX-1.0" |
| 44 | create := time.Now().Format("2006-01-02 15:04:05") |
| 45 | id := fmt.Sprintf("DSDX-%s-%s-%s", name, version, create) |
| 46 | return &DsdxDocument{ |
| 47 | Name: name, |
| 48 | Creator: creator, |
| 49 | ProjectName: name, |
| 50 | CreateTime: create, |
| 51 | DSDXVersion: version, |
| 52 | DSDXID: id, |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | func (doc *DsdxDocument) AppendComponents(id, group, name, version, language string, license []string) { |
| 57 | if id == "" { |