github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/prevent_extra_args_v7.go (about)

     1  // +build V7
     2  
     3  package main
     4  
     5  import (
     6  	"strings"
     7  
     8  	"code.cloudfoundry.org/cli/command/translatableerror"
     9  )
    10  
    11  func preventExtraArgs(args []string) error {
    12  	if len(args) > 0 {
    13  		return translatableerror.TooManyArgumentsError{
    14  			ExtraArgument: strings.Join(args, " "),
    15  		}
    16  	}
    17  	return nil
    18  }