Skip to content

Commit fe197d7

Browse files
committed
Update: Packages rename
1 parent 049496f commit fe197d7

13 files changed

+30
-30
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
digraph rfc6587 {
1+
digraph nontransparent {
22
rankdir=LR;
33
node [ shape = point ];
44
ENTRY;
@@ -8,11 +8,11 @@ digraph rfc6587 {
88
3;
99
node [ shape = circle ];
1010
1 -> 2 [ label = "'<' / on_init" ];
11-
2 -> 3 [ label = "'\\n' / on_trailer" ];
12-
2 -> 2 [ label = "DEF" ];
13-
3 -> 3 [ label = "'\\n' / on_trailer" ];
11+
2 -> 2 [ label = "1..'\\t', '\\v'..255, '\\n'(!27:13), 0(!27:13)" ];
12+
2 -> 3 [ label = "'\\n'(27:13), 0(28:13) / on_trailer" ];
13+
3 -> 2 [ label = "1..'\\t', '\\v'..';', '='..255, '\\n'(!27:13), 0(!27:13)" ];
1414
3 -> 2 [ label = "'<' / on_init" ];
15-
3 -> 2 [ label = "DEF" ];
15+
3 -> 3 [ label = "'\\n'(27:13), 0(28:13) / on_trailer" ];
1616
ENTRY -> 1 [ label = "IN" ];
1717
en_1 -> 1 [ label = "main" ];
1818
}

makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
SHELL := /bin/bash
22

33
.PHONY: build
4-
build: rfc5424/machine.go rfc5424/builder.go rfc6587/parser.go
4+
build: rfc5424/machine.go rfc5424/builder.go nontransparent/parser.go
55
@gofmt -w -s ./rfc5424
6-
@gofmt -w -s ./rfc5425
7-
@gofmt -w -s ./rfc6587
6+
@gofmt -w -s ./octetcounting
7+
@gofmt -w -s ./nontransparent
88

99
rfc5424/machine.go: rfc5424/machine.go.rl rfc5424/rfc5424.rl
1010

@@ -15,7 +15,7 @@ rfc5424/builder.go rfc5424/machine.go:
1515
@sed -i '/^\/\/line/d' $@
1616
$(MAKE) file=$@ snake2camel
1717

18-
rfc6587/parser.go: rfc6587/parser.go.rl
18+
nontransparent/parser.go: nontransparent/parser.go.rl
1919
ragel -Z -G2 -e -o $@ $<
2020
@sed -i '/^\/\/line/d' $@
2121
$(MAKE) file=$@ snake2camel
@@ -36,7 +36,7 @@ bench: rfc5424/*_test.go rfc5424/machine.go
3636
tests: rfc5424/machine.go rfc5424/builder.go
3737
go test -race -timeout 10s -coverprofile cover.out -v ./...
3838

39-
docs/rfc6587.dot: rfc6587/parser.go.rl
39+
docs/nontransparent.dot: nontransparent/parser.go.rl
4040
ragel -Z -Vp $< -o $@
4141

4242
docs/rfc5424.dot: rfc5424/machine.go.rl rfc5424/rfc5424.rl

rfc6587/example_test.go renamed to nontransparent/example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc6587
1+
package nontransparent
22

33
import (
44
"github.com/davecgh/go-spew/spew"

rfc6587/parser.go renamed to nontransparent/parser.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc6587
1+
package nontransparent
22

33
import (
44
syslog "github.com/influxdata/go-syslog"
@@ -7,10 +7,10 @@ import (
77
"io"
88
)
99

10-
const rfc6587Start int = 1
11-
const rfc6587Error int = 0
10+
const nontransparentStart int = 1
11+
const nontransparentError int = 0
1212

13-
const rfc6587EnMain int = 1
13+
const nontransparentEnMain int = 1
1414

1515
type machine struct {
1616
trailertyp TrailerType // default is 0 thus TrailerType(LF)

rfc6587/parser.go.rl renamed to nontransparent/parser.go.rl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc6587
1+
package nontransparent
22

33
import (
44
"io"
@@ -8,7 +8,7 @@ import (
88
)
99

1010
%%{
11-
machine rfc6587;
11+
machine nontransparent;
1212

1313
# unsigned alphabet
1414
alphtype uint8;

rfc6587/trailer_type.go renamed to nontransparent/trailer_type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc6587
1+
package nontransparent
22

33
import (
44
"fmt"

rfc6587/trailer_type_test.go renamed to nontransparent/trailer_type_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc6587
1+
package nontransparent
22

33
import (
44
"encoding/json"

rfc5425/example_test.go renamed to octetcounting/example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc5425
1+
package octetcounting
22

33
import (
44
"github.com/influxdata/go-syslog"

rfc5425/parser.go renamed to octetcounting/parser.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc5425
1+
package octetcounting
22

33
import (
44
"fmt"
@@ -8,7 +8,7 @@ import (
88
"github.com/influxdata/go-syslog/rfc5424"
99
)
1010

11-
// parser is capable to parse the input stream following RFC5425.
11+
// parser is capable to parse the input stream following octetcounting.
1212
//
1313
// Use NewParser function to instantiate one.
1414
type parser struct {

rfc5425/parser_test.go renamed to octetcounting/parser_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc5425
1+
package octetcounting
22

33
import (
44
"fmt"

rfc5425/scanner.go renamed to octetcounting/scanner.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc5425
1+
package octetcounting
22

33
import (
44
"bufio"
@@ -7,7 +7,7 @@ import (
77
"strconv"
88
)
99

10-
// size as per rfc5425#section-4.3.1
10+
// size as per octetcounting#section-4.3.1
1111
var size = 8192
1212

1313
// eof represents a marker byte for the end of the reader
@@ -29,7 +29,7 @@ func isNonZeroDigit(ch byte) bool {
2929
return (ch >= 48 && ch <= 57)
3030
}
3131

32-
// Scanner represents the lexical scanner for RFC5425.
32+
// Scanner represents the lexical scanner for octetcounting.
3333
type Scanner struct {
3434
r *bufio.Reader
3535
msglen uint64

rfc5425/tokens.go renamed to octetcounting/tokens.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
package rfc5425
1+
package octetcounting
22

33
import (
44
"strconv"
55
)
66

7-
// Token represents a lexical token of the RFC5425.
7+
// Token represents a lexical token of the octetcounting.
88
type Token struct {
99
typ TokenType
1010
lit []byte
1111
}
1212

13-
// TokenType represents a lexical token type of the RFC5425.
13+
// TokenType represents a lexical token type of the octetcounting.
1414
type TokenType int
1515

1616
// Tokens

rfc5425/tokens_test.go renamed to octetcounting/tokens_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rfc5425
1+
package octetcounting
22

33
import (
44
"fmt"

0 commit comments

Comments
 (0)