feat: initial commit
This commit is contained in:
commit
a161b86c9a
705 changed files with 288162 additions and 0 deletions
29
vendor/sourcery.dny.nu/pana/helpers.go
vendored
Normal file
29
vendor/sourcery.dny.nu/pana/helpers.go
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package pana
|
||||
|
||||
import ld "sourcery.dny.nu/longdistance"
|
||||
|
||||
func toReference(ids ...string) []ld.Node {
|
||||
if len(ids) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
res := make([]ld.Node, 0, len(ids))
|
||||
for _, id := range ids {
|
||||
res = append(res, ld.Node{ID: id})
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
func toLDNodes[T ld.Internal](ins ...T) []ld.Node {
|
||||
if len(ins) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
res := make([]ld.Node, 0, len(ins))
|
||||
for _, in := range ins {
|
||||
res = append(res, ld.Node(in))
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue