mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-10 08:30:02 +00:00
Knut Ahlers
f3c31476b4
* Update dependencies * Improve code quality * Apply linter advices * Add gzip compression to all requests * Rework frontend * Apply bootswatch theme * Hide historic details when not requested * Remove debugging header * Apply auto-migration of meta fields * Fix broken "last update" time * Pre-sort metrics for frontend / API * Add tooltip with absolute time * Some design fixes * Add tooltip with absolute date to last ok * Implement filters * Apply eslint --fix * Remove unused var * Remove remains of old template engine * Update baked in assets * Update Dockerfile for new version Signed-off-by: Knut Ahlers <knut@ahlers.me>
24 lines
437 B
Go
24 lines
437 B
Go
package ini
|
|
|
|
import (
|
|
"unicode"
|
|
)
|
|
|
|
// isWhitespace will return whether or not the character is
|
|
// a whitespace character.
|
|
//
|
|
// Whitespace is defined as a space or tab.
|
|
func isWhitespace(c rune) bool {
|
|
return unicode.IsSpace(c) && c != '\n' && c != '\r'
|
|
}
|
|
|
|
func newWSToken(b []rune) (Token, int, error) {
|
|
i := 0
|
|
for ; i < len(b); i++ {
|
|
if !isWhitespace(b[i]) {
|
|
break
|
|
}
|
|
}
|
|
|
|
return newToken(TokenWS, b[:i], NoneType), i, nil
|
|
}
|