mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
1.change validateNoSchema into validateNoScheme
2.change schema into scheme in docs and some annotations. Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
f95058aa0f
commit
28d3c22e55
6 changed files with 7 additions and 7 deletions
|
@ -234,7 +234,7 @@ func parseURL(ctx logger.Context) (*url.URL, error) {
|
|||
(splunkURL.Path != "" && splunkURL.Path != "/") ||
|
||||
splunkURL.RawQuery != "" ||
|
||||
splunkURL.Fragment != "" {
|
||||
return nil, fmt.Errorf("%s: expected format schema://dns_name_or_ip:port for %s", driverName, splunkURLKey)
|
||||
return nil, fmt.Errorf("%s: expected format scheme://dns_name_or_ip:port for %s", driverName, splunkURLKey)
|
||||
}
|
||||
|
||||
splunkURL.Path = "/services/collector/event/1.0"
|
||||
|
|
|
@ -36,7 +36,7 @@ logging driver options:
|
|||
| Option | Required | Description |
|
||||
|-----------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `splunk-token` | required | Splunk HTTP Event Collector token. |
|
||||
| `splunk-url` | required | Path to your Splunk Enterprise or Splunk Cloud instance (including port and schema used by HTTP Event Collector) `https://your_splunk_instance:8088`. |
|
||||
| `splunk-url` | required | Path to your Splunk Enterprise or Splunk Cloud instance (including port and scheme used by HTTP Event Collector) `https://your_splunk_instance:8088`. |
|
||||
| `splunk-source` | optional | Event source. |
|
||||
| `splunk-sourcetype` | optional | Event source type. |
|
||||
| `splunk-index` | optional | Event index. |
|
||||
|
@ -53,7 +53,7 @@ Both options add additional fields to the attributes of a logging message.
|
|||
Below is an example of the logging option specified for the Splunk Enterprise
|
||||
instance. The instance is installed locally on the same machine on which the
|
||||
Docker daemon is running. The path to the root certificate and Common Name is
|
||||
specified using an HTTPS schema. This is used for verification.
|
||||
specified using an HTTPS scheme. This is used for verification.
|
||||
The `SplunkServerDefaultCert` is automatically generated by Splunk certificates.
|
||||
|
||||
docker run --log-driver=splunk \
|
||||
|
|
|
@ -177,7 +177,7 @@ you must use `--rm=false`. This does not affect the build cache.
|
|||
This will clone the GitHub repository and use the cloned repository as context.
|
||||
The Dockerfile at the root of the repository is used as Dockerfile. Note that
|
||||
you can specify an arbitrary Git repository by using the `git://` or `git@`
|
||||
schema.
|
||||
scheme.
|
||||
|
||||
### Build with -
|
||||
|
||||
|
|
|
@ -277,7 +277,7 @@ repository.
|
|||
|
||||
docker build github.com/scollier/purpletest
|
||||
|
||||
Note: You can set an arbitrary Git repository via the `git://` schema.
|
||||
Note: You can set an arbitrary Git repository via the `git://` scheme.
|
||||
|
||||
## Building an image using a URL to a tarball'ed context
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ func ValidateIndexName(val string) (string, error) {
|
|||
return val, nil
|
||||
}
|
||||
|
||||
func validateNoSchema(reposName string) error {
|
||||
func validateNoScheme(reposName string) error {
|
||||
if strings.Contains(reposName, "://") {
|
||||
// It cannot contain a scheme!
|
||||
return ErrInvalidRepositoryName
|
||||
|
|
|
@ -91,7 +91,7 @@ func splitReposSearchTerm(reposName string) (string, string) {
|
|||
// Search queries the public registry for images matching the specified
|
||||
// search terms, and returns the results.
|
||||
func (s *Service) Search(term string, authConfig *types.AuthConfig, userAgent string, headers map[string][]string) (*registrytypes.SearchResults, error) {
|
||||
if err := validateNoSchema(term); err != nil {
|
||||
if err := validateNoScheme(term); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue