Przeglądaj źródła

1.change validateNoSchema into validateNoScheme
2.change schema into scheme in docs and some annotations.

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud 9 lat temu
rodzic
commit
28d3c22e55

+ 1 - 1
daemon/logger/splunk/splunk.go

@@ -234,7 +234,7 @@ func parseURL(ctx logger.Context) (*url.URL, error) {
 		(splunkURL.Path != "" && splunkURL.Path != "/") ||
 		(splunkURL.Path != "" && splunkURL.Path != "/") ||
 		splunkURL.RawQuery != "" ||
 		splunkURL.RawQuery != "" ||
 		splunkURL.Fragment != "" {
 		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"
 	splunkURL.Path = "/services/collector/event/1.0"

+ 2 - 2
docs/admin/logging/splunk.md

@@ -36,7 +36,7 @@ logging driver options:
 | Option                      | Required | Description                                                                                                                                                                                                        |
 | Option                      | Required | Description                                                                                                                                                                                                        |
 |-----------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 |-----------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 | `splunk-token`              | required | Splunk HTTP Event Collector token.                                                                                                                                                                                 |
 | `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-source`             | optional | Event source.                                                                                                                                                                                                      |
 | `splunk-sourcetype`         | optional | Event source type.                                                                                                                                                                                                 |
 | `splunk-sourcetype`         | optional | Event source type.                                                                                                                                                                                                 |
 | `splunk-index`              | optional | Event index.                                                                                                                                                                                                       |
 | `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
 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
 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
 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.
 The `SplunkServerDefaultCert` is automatically generated by Splunk certificates.
 
 
     docker run --log-driver=splunk \
     docker run --log-driver=splunk \

+ 1 - 1
docs/reference/commandline/build.md

@@ -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.
 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
 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@`
 you can specify an arbitrary Git repository by using the `git://` or `git@`
-schema.
+scheme.
 
 
 ### Build with -
 ### Build with -
 
 

+ 1 - 1
man/docker-build.1.md

@@ -277,7 +277,7 @@ repository.
 
 
     docker build github.com/scollier/purpletest
     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
 ## Building an image using a URL to a tarball'ed context
 
 

+ 1 - 1
registry/config.go

@@ -206,7 +206,7 @@ func ValidateIndexName(val string) (string, error) {
 	return val, nil
 	return val, nil
 }
 }
 
 
-func validateNoSchema(reposName string) error {
+func validateNoScheme(reposName string) error {
 	if strings.Contains(reposName, "://") {
 	if strings.Contains(reposName, "://") {
 		// It cannot contain a scheme!
 		// It cannot contain a scheme!
 		return ErrInvalidRepositoryName
 		return ErrInvalidRepositoryName

+ 1 - 1
registry/service.go

@@ -91,7 +91,7 @@ func splitReposSearchTerm(reposName string) (string, string) {
 // Search queries the public registry for images matching the specified
 // Search queries the public registry for images matching the specified
 // search terms, and returns the results.
 // search terms, and returns the results.
 func (s *Service) Search(term string, authConfig *types.AuthConfig, userAgent string, headers map[string][]string) (*registrytypes.SearchResults, error) {
 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
 		return nil, err
 	}
 	}