func (w *WorklogItem) CreateID(worklogType WorklogType) {
	h, err := blake2b.New(&blake2b.Config{Size: worklogIDLen - 1})
	if err != nil { // this only happens with a bad config
		panic(err)
	}

	h.Write([]byte{byte(worklogType)})
	h.Write([]byte(w.Subject))

	id := WorklogID{byte(worklogType)}
	copy(id[1:], h.Sum(nil))
	w.ID = &id
}
// CreateID creates and populates a WorklogID for the WorklogItem based on the
// given type and its subject.
CreateID creates and populates a WorklogID for the WorklogItem based on the
given type and its subject.
// CreateID creates and populates a WorklogID for the WorklogItem based on the // given type and its subject .
func (w *WorklogItem) CreateID(worklogType WorklogType) {
	h, err := blake2b.New(&blake2b.Config{Size: worklogIDLen - 1})
	if err != nil { 
		panic(err)
	}
	h.Write([]byte{byte(worklogType)})
	h.Write([]byte(w.Subject))
	id := WorklogID{byte(worklogType)}
	copy(id[1:], h.Sum(nil))
	w.ID = &id
}
func ( w * WorklogItem ) CreateID ( worklogType WorklogType ) { h , err := blake2b . New ( & blake2b . Config { Size : worklogIDLen - 1 } ) if err != nil { panic ( err ) } h . Write ( [ ] byte { byte ( worklogType ) } ) h . Write ( [ ] byte ( w . Subject ) ) id := WorklogID { byte ( worklogType ) } copy ( id [ 1 : ] , h . Sum ( nil ) ) w . ID = & id }
CreateID creates and populates a WorklogID for the WorklogItem based on the
given type and its subject.
CreateID creates and populates a WorklogID for the WorklogItem based on the given type and its subject .
// this only happens with a bad config