예제 #1
0
func main() {

	//line3:=`"hello":"Jessie:'http:///www.google.com'"`
	line3 := "hello=2"

	cuda.DebugPrintCharCounter(line3)

	lineAsArray3 := strings.Split(line3, "")

	delims, data := cuda.GetIndexes(lineAsArray3)

	fmt.Printf("\nBefore: delims: %v\n  data: %v \n", delims, data)

	delims, data = cuda.QuotesFilter(lineAsArray3, delims, data)

	fmt.Printf("\nAfter QuotesFilter:  delims: %v\n data: %v \n", delims, data)

	delims, data = cuda.PathFilter(lineAsArray3, delims, data)

	fmt.Printf("\nAfter PathFilter:  delims: %v\n data: %v \n", delims, data)

	delims, data = cuda.UrlFilter(lineAsArray3, delims, data)

	fmt.Printf("\nAfter UrlFilter:  delims: %v\n data: %v \n", delims, data)

	template_string := cuda.GenTemplate(lineAsArray3, data)

	fmt.Printf("###\nTemplate string:\n%s\n", template_string)

}
예제 #2
0
파일: parse.go 프로젝트: gtfour/actuator
func ParseLine(line string) (entry map[string]string) {
	line_slice := strings.Split(line, "")
	delims, data := cuda.GetIndexes(line_slice)
	delims, data = cuda.QuotesFilter(line_slice, delims, data)
	cuda.DebugPrintCharCounter(line)
	fmt.Printf("\ndelims: %v\n data: %v\n", delims, data)
	return entry
}