MCPcopy Create free account
hub / github.com/apache/camel-k / ReplaceFromURI

Method ReplaceFromURI

pkg/util/source/inspector_java_source.go:62–64  ·  view source on GitHub ↗

ReplaceFromURI parses the source content and replace the `from` URI configuration with the a new URI. Returns true if it applies a replacement.

(source *v1.SourceSpec, newFromURI string)

Source from the content-addressed store, hash-verified

60
61// ReplaceFromURI parses the source content and replace the `from` URI configuration with the a new URI. Returns true if it applies a replacement.
62func (i JavaSourceInspector) ReplaceFromURI(source *v1.SourceSpec, newFromURI string) (bool, error) {
63 return replaceFromURIDoubleQuotesOnly(source, newFromURI)
64}
65
66func replaceFromURIDoubleQuotesOnly(source *v1.SourceSpec, newFromURI string) (bool, error) {
67 originalContent := source.Content

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected