Skip to content

Commit f1d0c10

Browse files
committed
unexport PathParser
1 parent ebdbdcb commit f1d0c10

File tree

4 files changed

+37
-18
lines changed

4 files changed

+37
-18
lines changed

.checkapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ ignored_functions:
8080
- ^Test.*
8181
- ^Benchmark.*
8282
- ^Fuzz.*
83+
- ^Example.*
8384

8485
unkeyed_literal_initialization:
8586
enabled: true

internal/tools/go.mod

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/jstemmer/go-junit-report v1.0.0
1313
github.com/open-telemetry/opentelemetry-collector-contrib/cmd/codecovgen v0.138.0
1414
github.com/rhysd/actionlint v1.7.8
15-
go.opentelemetry.io/build-tools/checkapi v0.26.2
15+
go.opentelemetry.io/build-tools/checkapi v0.29.0
1616
go.opentelemetry.io/build-tools/checkfile v0.28.1
1717
go.opentelemetry.io/build-tools/chloggen v0.28.1
1818
go.opentelemetry.io/build-tools/crosslink v0.28.1
@@ -22,7 +22,7 @@ require (
2222
go.opentelemetry.io/collector/cmd/builder v0.138.1-0.20251030084003-6f29b34c24f6
2323
go.opentelemetry.io/collector/cmd/mdatagen v0.138.1-0.20251030084003-6f29b34c24f6
2424
go.uber.org/goleak v1.3.0
25-
golang.org/x/tools v0.36.0
25+
golang.org/x/tools v0.37.0
2626
golang.org/x/tools/gopls v0.20.0
2727
golang.org/x/vuln v1.1.4
2828
gotest.tools/gotestsum v1.13.0
@@ -98,6 +98,7 @@ require (
9898
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
9999
github.com/go-git/go-billy/v5 v5.6.2 // indirect
100100
github.com/go-git/go-git/v5 v5.16.2 // indirect
101+
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b // indirect
101102
github.com/go-toolsmith/astcast v1.1.0 // indirect
102103
github.com/go-toolsmith/astcopy v1.1.0 // indirect
103104
github.com/go-toolsmith/astequal v1.2.0 // indirect
@@ -108,6 +109,8 @@ require (
108109
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
109110
github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect
110111
github.com/gobwas/glob v0.2.3 // indirect
112+
github.com/goccy/go-json v0.10.5 // indirect
113+
github.com/goccy/go-yaml v1.18.0 // indirect
111114
github.com/gofrs/flock v0.12.1 // indirect
112115
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
113116
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
@@ -141,6 +144,9 @@ require (
141144
github.com/joshdk/go-junit v1.0.0 // indirect
142145
github.com/json-iterator/go v1.1.12 // indirect
143146
github.com/julz/importas v0.2.0 // indirect
147+
github.com/kaptinlin/go-i18n v0.1.6 // indirect
148+
github.com/kaptinlin/jsonschema v0.4.12 // indirect
149+
github.com/kaptinlin/messageformat-go v0.4.0 // indirect
144150
github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect
145151
github.com/kevinburke/ssh_config v1.4.0 // indirect
146152
github.com/kisielk/errcheck v1.9.0 // indirect
@@ -270,9 +276,9 @@ require (
270276
golang.org/x/oauth2 v0.31.0 // indirect
271277
golang.org/x/sync v0.17.0 // indirect
272278
golang.org/x/sys v0.36.0 // indirect
273-
golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488 // indirect
279+
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053 // indirect
274280
golang.org/x/term v0.35.0 // indirect
275-
golang.org/x/text v0.29.0 // indirect
281+
golang.org/x/text v0.30.0 // indirect
276282
google.golang.org/protobuf v1.36.10 // indirect
277283
gopkg.in/warnings.v0 v0.1.2 // indirect
278284
gopkg.in/yaml.v2 v2.4.0 // indirect

internal/tools/go.sum

Lines changed: 20 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/carbonreceiver/protocol/path_parser_helper.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"go.opentelemetry.io/collector/pdata/pmetric"
1616
)
1717

18-
// PathParser implements the code needed to handle only the <metric_path> part of
18+
// pathParser implements the code needed to handle only the <metric_path> part of
1919
// a Carbon metric line:
2020
//
2121
// <metric_path> <metric_value> <metric_timestamp>
@@ -25,7 +25,7 @@ import (
2525
//
2626
// The type PathParserHelper implements the common code for parsers that differ
2727
// only by the way that they handle the <metric_path>.
28-
type PathParser interface {
28+
type pathParser interface {
2929
// ParsePath parses the <metric_path> of a Carbon line (see Parse function
3030
// for description of the full line). The results of parsing the path are
3131
// stored on the parsedPath struct. Implementers of the interface can assume
@@ -34,7 +34,7 @@ type PathParser interface {
3434
}
3535

3636
// parsedPath holds the result of parsing the <metric_path> with the ParsePath
37-
// method on the PathParser interface.
37+
// method on the pathParser interface.
3838
type parsedPath struct {
3939
// MetricName extracted/generated by the parser.
4040
MetricName string
@@ -55,16 +55,16 @@ const (
5555
)
5656

5757
// PathParserHelper implements the common code to parse a Carbon line taking a
58-
// PathParser to implement a full parser.
58+
// pathParser to implement a full parser.
5959
type PathParserHelper struct {
60-
pathParser PathParser
60+
pathParser pathParser
6161
}
6262

6363
var _ Parser = (*PathParserHelper)(nil)
6464

6565
// newParser creates a new Parser instance that receives plaintext
6666
// Carbon data.
67-
func newParser(pathParser PathParser) (Parser, error) {
67+
func newParser(pathParser pathParser) (Parser, error) {
6868
if pathParser == nil {
6969
return nil, errors.New("nil pathParser")
7070
}

0 commit comments

Comments
 (0)