Files
rootandClaude Opus 5 8679200f41 Initial commit
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 13:57:10 +08:00

21 lines
371 B
Go

package marqueemod
import (
"time"
"go.mongodb.org/mongo-driver/bson"
)
func Set(content string) error {
if _, err := coll(nil).DeleteMany(bson.M{}); err != nil {
return err
}
_, err := coll(nil).InsertOne(Marquee{Content: content, CreatedAt: time.Now()})
return err
}
func Get() (Marquee, error) {
var m Marquee
return m, coll(nil).FindOne(&m, bson.M{})
}