From 3528650948cc12976fa6a7adce6a87e294156e30 Mon Sep 17 00:00:00 2001 From: Fae Charlton Date: Wed, 23 Jun 2021 11:47:14 -0400 Subject: [PATCH] make update doesn't work but make check does? --- filebeat/input/syslog/format_check.go | 233 +++++++++++++++----------- 1 file changed, 131 insertions(+), 102 deletions(-) diff --git a/filebeat/input/syslog/format_check.go b/filebeat/input/syslog/format_check.go index fe86dbfa4e3..6a63626b4cc 100644 --- a/filebeat/input/syslog/format_check.go +++ b/filebeat/input/syslog/format_check.go @@ -19,7 +19,6 @@ // Code generated by ragel DO NOT EDIT. package syslog - //line format_check.go:8 const format_check_start int = 1 const format_check_first_final int = 15 @@ -27,244 +26,274 @@ const format_check_error int = 0 const format_check_en_main int = 1 - //line parser/format_check.rl:9 - func IsRFC5424Format(data []byte) bool { - var p, cs int - isRFC5424 := false - pe := len(data) - + var p, cs int + isRFC5424 := false + pe := len(data) + //line format_check.go:24 { - cs = format_check_start + cs = format_check_start } //line format_check.go:29 { - if ( p) == ( pe) { - goto _test_eof - } - switch cs { - case 1: - goto st_case_1 - case 0: - goto st_case_0 - case 2: - goto st_case_2 - case 3: - goto st_case_3 - case 4: - goto st_case_4 - case 5: - goto st_case_5 - case 6: - goto st_case_6 - case 7: - goto st_case_7 - case 8: - goto st_case_8 - case 9: - goto st_case_9 - case 15: - goto st_case_15 - case 10: - goto st_case_10 - case 11: - goto st_case_11 - case 12: - goto st_case_12 - case 13: - goto st_case_13 - case 14: - goto st_case_14 - } - goto st_out + if (p) == (pe) { + goto _test_eof + } + switch cs { + case 1: + goto st_case_1 + case 0: + goto st_case_0 + case 2: + goto st_case_2 + case 3: + goto st_case_3 + case 4: + goto st_case_4 + case 5: + goto st_case_5 + case 6: + goto st_case_6 + case 7: + goto st_case_7 + case 8: + goto st_case_8 + case 9: + goto st_case_9 + case 15: + goto st_case_15 + case 10: + goto st_case_10 + case 11: + goto st_case_11 + case 12: + goto st_case_12 + case 13: + goto st_case_13 + case 14: + goto st_case_14 + } + goto st_out st_case_1: - if data[( p)] == 60 { + if data[(p)] == 60 { goto st2 } goto st0 -st_case_0: + st_case_0: st0: cs = 0 goto _out st2: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof2 } st_case_2: - switch data[( p)] { + switch data[(p)] { case 48: goto st3 case 49: goto st12 } - if 50 <= data[( p)] && data[( p)] <= 57 { + if 50 <= data[(p)] && data[(p)] <= 57 { goto st13 } goto st0 st3: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof3 } st_case_3: - if data[( p)] == 62 { + if data[(p)] == 62 { goto st4 } goto st0 st4: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof4 } st_case_4: - if 49 <= data[( p)] && data[( p)] <= 57 { + if 49 <= data[(p)] && data[(p)] <= 57 { goto st5 } goto st0 st5: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof5 } st_case_5: - if data[( p)] == 32 { + if data[(p)] == 32 { goto st6 } - if 48 <= data[( p)] && data[( p)] <= 57 { + if 48 <= data[(p)] && data[(p)] <= 57 { goto st10 } goto st0 st6: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof6 } st_case_6: - if 48 <= data[( p)] && data[( p)] <= 57 { + if 48 <= data[(p)] && data[(p)] <= 57 { goto tr9 } goto st0 -tr9: + tr9: //line parser/format_check.rl:17 - isRFC5424 = true - - goto st7 + isRFC5424 = true + + goto st7 st7: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof7 } st_case_7: //line format_check.go:143 - if 48 <= data[( p)] && data[( p)] <= 57 { + if 48 <= data[(p)] && data[(p)] <= 57 { goto st8 } goto st0 st8: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof8 } st_case_8: - if 48 <= data[( p)] && data[( p)] <= 57 { + if 48 <= data[(p)] && data[(p)] <= 57 { goto st9 } goto st0 st9: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof9 } st_case_9: - if 48 <= data[( p)] && data[( p)] <= 57 { + if 48 <= data[(p)] && data[(p)] <= 57 { goto st15 } goto st0 st15: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof15 } st_case_15: goto st0 st10: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof10 } st_case_10: - if data[( p)] == 32 { + if data[(p)] == 32 { goto st6 } - if 48 <= data[( p)] && data[( p)] <= 57 { + if 48 <= data[(p)] && data[(p)] <= 57 { goto st11 } goto st0 st11: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof11 } st_case_11: - if data[( p)] == 32 { + if data[(p)] == 32 { goto st6 } goto st0 st12: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof12 } st_case_12: - switch data[( p)] { + switch data[(p)] { case 57: goto st14 case 62: goto st4 } - if 48 <= data[( p)] && data[( p)] <= 56 { + if 48 <= data[(p)] && data[(p)] <= 56 { goto st13 } goto st0 st13: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof13 } st_case_13: - if data[( p)] == 62 { + if data[(p)] == 62 { goto st4 } - if 48 <= data[( p)] && data[( p)] <= 57 { + if 48 <= data[(p)] && data[(p)] <= 57 { goto st3 } goto st0 st14: - if ( p)++; ( p) == ( pe) { + if (p)++; (p) == (pe) { goto _test_eof14 } st_case_14: - if data[( p)] == 62 { + if data[(p)] == 62 { goto st4 } - if 48 <= data[( p)] && data[( p)] <= 49 { + if 48 <= data[(p)] && data[(p)] <= 49 { goto st3 } goto st0 st_out: - _test_eof2: cs = 2; goto _test_eof - _test_eof3: cs = 3; goto _test_eof - _test_eof4: cs = 4; goto _test_eof - _test_eof5: cs = 5; goto _test_eof - _test_eof6: cs = 6; goto _test_eof - _test_eof7: cs = 7; goto _test_eof - _test_eof8: cs = 8; goto _test_eof - _test_eof9: cs = 9; goto _test_eof - _test_eof15: cs = 15; goto _test_eof - _test_eof10: cs = 10; goto _test_eof - _test_eof11: cs = 11; goto _test_eof - _test_eof12: cs = 12; goto _test_eof - _test_eof13: cs = 13; goto _test_eof - _test_eof14: cs = 14; goto _test_eof + _test_eof2: + cs = 2 + goto _test_eof + _test_eof3: + cs = 3 + goto _test_eof + _test_eof4: + cs = 4 + goto _test_eof + _test_eof5: + cs = 5 + goto _test_eof + _test_eof6: + cs = 6 + goto _test_eof + _test_eof7: + cs = 7 + goto _test_eof + _test_eof8: + cs = 8 + goto _test_eof + _test_eof9: + cs = 9 + goto _test_eof + _test_eof15: + cs = 15 + goto _test_eof + _test_eof10: + cs = 10 + goto _test_eof + _test_eof11: + cs = 11 + goto _test_eof + _test_eof12: + cs = 12 + goto _test_eof + _test_eof13: + cs = 13 + goto _test_eof + _test_eof14: + cs = 14 + goto _test_eof - _test_eof: {} - _out: {} + _test_eof: + { + } + _out: + { + } } //line parser/format_check.rl:28 - return isRFC5424 + return isRFC5424 }