0

Change layout to more go-style-ish, replace some modules

* Deejay files, split them to achieve go-style project layout
* Replace logrus with log/slog module to reduce dependencies
* Replace gopkg.in/ini.v1 with github.com/wlevene/ini to make sure all modules BSD licensed
* Update linter config && fix tons of linter warnings
* Update .gitignore
* Update README.md
This commit is contained in:
eleksir
2025-11-09 22:16:04 +03:00
parent c5f4682cb9
commit 79d9a2f604
211 changed files with 12879 additions and 7732 deletions

52
vendor/github.com/wlevene/ini/token/token.go generated vendored Normal file
View File

@@ -0,0 +1,52 @@
package token
import "fmt"
type TokenType string
const (
TokenType_ILLEGAL = "ILLEGAL"
TokenType_EOF = "EOF"
Ident = "Ident"
TokenType_SECTION = "SECTION"
TokenType_KEY = "KEY"
TokenType_VALUE = "VALUE"
TokenType_COMMENT = "#"
TokenType_COMMENT2 = "#"
TokenType_ASSIGN = "="
TokenType_LBRACKET = "["
TokenType_RBRACKET = "]"
RETURN = "RETURN"
)
type Token struct {
Type TokenType
Literal string
Line int
}
var keywords = map[string]TokenType{
"return": RETURN,
}
func LookupIdent(ident string) TokenType {
if tok, ok := keywords[ident]; ok {
return tok
}
return Ident
}
func (t Token) String() string {
return fmt.Sprintf("{Type:%s,Literal:\"%s\" Linie:%d}",
t.Type,
t.Literal,
t.Line)
}
//Is check type of a token
func (t Token) Is(typ TokenType) bool {
return t.Type == typ
}