etcdctl/ctlv3/command/put_command.go
func putCommandFunc(cmd *cobra.Command, args []string) {
	key, value, opts := getPutOp(args)

	ctx, cancel := commandCtx(cmd)
	resp, err := mustClientFromCmd(cmd).Put(ctx, key, value, opts...)
	cancel()
	if err != nil {
		ExitWithError(ExitError, err)
	}
	display.Put(*resp)
}
func putCommandFunc(cmd *cobra.Command, args []string) {
	key, value, opts := getPutOp(args)

	ctx, cancel := commandCtx(cmd)
	resp, err := mustClientFromCmd(cmd).Put(ctx, key, value, opts...)
	cancel()
	if err != nil {
		ExitWithError(ExitError, err)
	}
	display.Put(*resp)
}
func putCommandFunc ( cmd * cobra . Command , args [ ] string ) { key , value , opts := getPutOp ( args ) ctx , cancel := commandCtx ( cmd ) resp , err := mustClientFromCmd ( cmd ) . Put ( ctx , key , value , opts ... ) cancel ( ) if err != nil { ExitWithError ( ExitError , err ) } display . Put ( * resp ) }
// putCommandFunc executes the "put" command.
putCommandFunc executes the put command .