chore(all): resolve lint findings, update example plugin, refine docs and add LGPL licenses

This commit is contained in:
2026-10-07 00:57:35 +08:00
parent e8e9d77974
commit 8e8ddeddb6
388 changed files with 4638 additions and 3321 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ func (s *Store) ResearchObjects(pack int) ([]int, error) {
if string(raw) != "once" {
return nil, fmt.Errorf("progress: invalid research entry")
}
if strings.HasPrefix(key, prefix) {
id, e := strconv.Atoi(strings.TrimPrefix(key, prefix))
if suffix, found := strings.CutPrefix(key, prefix); found {
id, e := strconv.Atoi(suffix)
if e != nil || id <= 0 {
return nil, fmt.Errorf("progress: invalid research identity")
}