mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-30 01:25:30 +00:00
Akteure beginning
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
@@ -60,6 +61,15 @@ func (p Piece) ReferencesIssue(y, no int) (*IssueRef, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
func (p Piece) ReferencesAgent(a string) (*AgentRef, bool) {
|
||||
for _, i := range p.AgentRefs {
|
||||
if strings.HasPrefix(i.Ref, a) {
|
||||
return &i, true
|
||||
}
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// TODO: We can make this fast depending on which category to look for
|
||||
// but we'll have to define rules for every single category (~35 of them)
|
||||
func (p Piece) IsCat(k string) bool {
|
||||
|
||||
Reference in New Issue
Block a user