You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new package pkg/badwords which contains badwords.go with a type List struct and at least the functions func ReadList(r io.Reader) (*List, error), func (l *List) AddWord(word string) (but don't need this if you're doing an optimized implementation which needs stuff to be precomputed) and func (l *List) Filter(s string) string.
It's up to you how to do the filtering, and while it should be efficient, it doesn't have to be optimal since we don't do it too often.
Adding a word doesn't need to be safe for concurrent use.
Create unit tests in badwords_test.go.
Second commit:
Add a config option in pkg/atlas, BadWordList string `env:"ATLAS_BADWORDS_LIST"`.
Read the word list from the provided filename and set the BadWords field of api0.Handler when creating a new *Server.
Required for feature parity with the old server, also supersedes R2Northstar/NorthstarMasterServer#66.
The text was updated successfully, but these errors were encountered: