fixed dependencies

This commit is contained in:
nuknal
2024-10-24 15:46:01 +08:00
parent d16a5bd9c0
commit 1161e8d054
2005 changed files with 690883 additions and 0 deletions

43
vendor/github.com/go-latex/latex/mtex/symbols/set.go generated vendored Normal file
View File

@@ -0,0 +1,43 @@
// Copyright ©2020 The go-latex Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package symbols
import (
"sort"
)
type Set map[string]struct{}
func NewSet(vs ...string) Set {
o := make(Set, len(vs))
for _, k := range vs {
o[k] = struct{}{}
}
return o
}
func (set Set) Has(k string) bool {
_, ok := set[k]
return ok
}
func (set Set) Keys() []string {
keys := make([]string, 0, len(set))
for k := range set {
keys = append(keys, k)
}
sort.Strings(keys)
return keys
}
func UnionOf(sets ...Set) Set {
o := make(Set, len(sets))
for _, set := range sets {
for k := range set {
o[k] = struct{}{}
}
}
return o
}