Skip to content

Commit 95d91aa

Browse files
committed
rename flag
1 parent 26b8a6c commit 95d91aa

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/kcp/kcp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ func main() {
7676
} // else let normal flag processing fail
7777
} else if strings.HasPrefix(f, "--root-directory=") {
7878
rootDir = strings.TrimPrefix(f, "--root-directory=")
79-
} else if f == "--mapping-file" {
79+
} else if f == "--miniproxy-mapping-file" {
8080
if i < len(os.Args)-1 {
8181
additionalMappingsFile = os.Args[i+1]
8282
} // else let normal flag processing fail
83-
} else if strings.HasPrefix(f, "--mapping-file") {
83+
} else if strings.HasPrefix(f, "--miniproxy-mapping-file") {
8484
additionalMappingsFile = strings.TrimPrefix(f, "--mapping-file=")
8585
}
8686
}

cmd/kcp/options/generic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewGeneric(rootDir string) *GenericOptions {
4040
func (o *GenericOptions) AddFlags(fss *cliflag.NamedFlagSets) {
4141
fs := fss.FlagSet("KCP")
4242
fs.StringVar(&o.RootDirectory, "root-directory", o.RootDirectory, "Root directory. Set to \"\" to disable file (e.g. certificates) generation in a root directory.")
43-
fs.StringVar(&o.MappingFile, "mapping-file", o.MappingFile, "Path to additional mapping file to be used by mini-front-proxy.")
43+
fs.StringVar(&o.MappingFile, "miniproxy-mapping-file", o.MappingFile, "DEVELOPMENT ONLY. Path to additional mapping file to be used by mini-front-proxy. This should not be used in production. For production usecase use front-proxy component instead.")
4444
}
4545

4646
func (o *GenericOptions) Complete() (*GenericOptions, error) {

pkg/server/options/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type ExtraOptions struct {
6969
BatteriesIncluded []string
7070
// DEVELOPMENT ONLY. AdditionalMappingsFile is the path to a file that contains additional mappings
7171
// for the mini-front-proxy to use. The file should be in the format of the
72-
// --mapping-file flag of the front-proxy. Do NOT expose this flag to users via main server options.
72+
// --miniproxy-mapping-file flag of the front-proxy. Do NOT expose this flag to users via main server options.
7373
// It is overridden by the kcp start command.
7474
AdditionalMappingsFile string
7575
}

0 commit comments

Comments
 (0)