<commit_before>package main

import (
	"context"
	"fmt"

	"github.com/influxdata/influxdb"
	"github.com/influxdata/influxdb/http"
	"github.com/spf13/cobra"
	input "github.com/tcnksm/go-input"
)

type secretSVCsFn func() (influxdb.SecretService, influxdb.OrganizationService, func(*input.UI) string, error)

func cmdSecret(f *globalFlags, opt genericCLIOpts) *cobra.Command {
	builder := newCmdSecretBuilder(newSecretSVCs, opt)
	builder.globalFlags = f
	return builder.cmd()
}

type cmdSecretBuilder struct {
	genericCLIOpts
	*globalFlags

	svcFn secretSVCsFn

	key   string
	value string
	org   organization
}

func newCmdSecretBuilder(svcsFn secretSVCsFn, opt genericCLIOpts) *cmdSecretBuilder {
	return &cmdSecretBuilder{
		genericCLIOpts: opt,
		svcFn:          svcsFn,
	}
}

func (b *cmdSecretBuilder) cmd() *cobra.Command {
	cmd := b.newCmd("secret", nil)
	cmd.Short = "Secret management commands"
	cmd.Run = seeHelp
	cmd.AddCommand(
		b.cmdDelete(),
		b.cmdFind(),
		b.cmdUpdate(),
	)
	return cmd
}

func (b *cmdSecretBuilder) cmdUpdate() *cobra.Command {
	cmd := b.newCmd("update", b.cmdUpdateRunEFn)
	cmd.Short = "Update secret"
	cmd.Flags().StringVarP(&b.key, "key", "k", "", "The secret key (required)")
	cmd.Flags().StringVarP(&b.value, "value", "v", "", "Optional secret value for scripting convenience, using this might exposed the secret to your local history")
	cmd.MarkFlagRequired("key")
	b.org.register(cmd, false)<commit_msg>chore(cmd/influx): typo<commit_after>package main

import (
	"context"
	"fmt"

	"github.com/influxdata/influxdb"
	"github.com/influxdata/influxdb/http"
	"github.com/spf13/cobra"
	input "github.com/tcnksm/go-input"
)

type secretSVCsFn func() (influxdb.SecretService, influxdb.OrganizationService, func(*input.UI) string, error)

func cmdSecret(f *globalFlags, opt genericCLIOpts) *cobra.Command {
	builder := newCmdSecretBuilder(newSecretSVCs, opt)
	builder.globalFlags = f
	return builder.cmd()
}

type cmdSecretBuilder struct {
	genericCLIOpts
	*globalFlags

	svcFn secretSVCsFn

	key   string
	value string
	org   organization
}

func newCmdSecretBuilder(svcsFn secretSVCsFn, opt genericCLIOpts) *cmdSecretBuilder {
	return &cmdSecretBuilder{
		genericCLIOpts: opt,
		svcFn:          svcsFn,
	}
}

func (b *cmdSecretBuilder) cmd() *cobra.Command {
	cmd := b.newCmd("secret", nil)
	cmd.Short = "Secret management commands"
	cmd.Run = seeHelp
	cmd.AddCommand(
		b.cmdDelete(),
		b.cmdFind(),
		b.cmdUpdate(),
	)
	return cmd
}

func (b *cmdSecretBuilder) cmdUpdate() *cobra.Command {
	cmd := b.newCmd("update", b.cmdUpdateRunEFn)
	cmd.Short = "Update secret"
	cmd.Flags().StringVarP(&b.key, "key", "k", "", "The secret key (required)")
	cmd.Flags().StringVarP(&b.value, "value", "v", "", "Optional secret value for scripting convenience, using this might expose the secret to your local history")
	cmd.MarkFlagRequired("key")
	b.org.register(cmd, false)
{'fraction_non_alphanumeric': 0.13255091473938557, 'fraction_numerical': 0.001380738695201933, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1637353', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1036, 'n_words': 232}