func Lex(input string) (*Lexer, chan Item) {
	lexer := &Lexer{
		Input: input + " ",
		Items: make(chan Item),
	}
	go lexer.run()
	return lexer, lexer.Items
}
Lex creates a Lexer with the given input, runs it in a go routine and returns the lexer and
its channel for items
package lexer
import (
	"unicode/utf8"
)
const (
	EOF rune = -1
)
type Lexer struct {
	Input    string
	Start    int
	Width    int
	Position int
	Items    chan Item
}
func (lexer *Lexer) emit(t ItemType) {
	lexer.Items <- Item{
		Type:  t,
		Value: lexer.Input[lexer.Start:lexer.Position],
	}
	lexer.Start = lexer.Position
}
func (lexer *Lexer) next() (rune rune) {
	if lexer.Position >= len(lexer.Input) {
		return EOF
	}
	rune, lexer.Width = utf8.DecodeRuneInString(lexer.Input[lexer.Position:])
	lexer.Position += lexer.Width
	return rune
}
func (lexer *Lexer) ignore() {
	lexer.Start = lexer.Position
}
func (lexer *Lexer) back() {
	lexer.Position -= lexer.Width
}
func (lexer *Lexer) run() {
	for lexer.Position < len(lexer.Input) {
		rune := lexer.next()
		value, valid := symbols[rune]
		switch {
		case IsAlphaNumeric(rune):
			lexer.back()
			lexIdentifier(lexer)
			break
		case IsSpace(rune):
			lexer.ignore()
			break
		case rune == '-':
			ignoreComments(lexer)
			break
		case rune == '"':
			lexString(lexer)
			break
		case rune == '+' || rune == '-' || ('0' <= rune && rune <= '9'):
			lexer.back()
			lexNumber(lexer)
			break
		case valid:
			lexer.emit(value)
			break
		case rune == '<':
			nextRune := lexer.next()
			if nextRune == '=' {
				lexer.emit(ItemEqualOrLessCheck)
			} else {
				lexer.back()
				lexer.emit(ItemLessCheck)
			}
		case rune == '>':
			nextRune := lexer.next()
			if nextRune == '=' {
				lexer.emit(ItemEqualOrGreaterCheck)
			} else {
				lexer.back()
				lexer.emit(ItemGreaterCheck)
			}
		case rune == '=':
			nextRune := lexer.next()
			if nextRune == '=' {
				lexer.emit(ItemEqualityCheck)
			} else if nextRune == '!' {
				lexer.emit(ItemNotEqualityCheck)
			} else {
				lexer.back()
				lexer.emit(ItemEquals)
			}
		}
	}
	lexer.emit(ItemEOF)
}