MCPcopy Index your code
hub / github.com/openshift/source-to-image / Get

Method Get

pkg/scripts/install.go:74–87  ·  view source on GitHub ↗

Get parses the provided URL and the script name.

(script string)

Source from the content-addressed store, hash-verified

72
73// Get parses the provided URL and the script name.
74func (s *URLScriptHandler) Get(script string) *api.InstallResult {
75 if len(s.URL) == 0 {
76 return nil
77 }
78 scriptURL, err := url.ParseRequestURI(s.URL + "/" + script)
79 if err != nil {
80 log.Infof("invalid script url %q: %v", s.URL, err)
81 return nil
82 }
83 return &api.InstallResult{
84 Script: script,
85 URL: scriptURL.String(),
86 }
87}
88
89// Install downloads the script and fix its permissions.
90func (s *URLScriptHandler) Install(r *api.InstallResult) error {

Callers

nothing calls this directly

Calls 2

InfofMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected