<commit_before>package main

import (
	"fmt"
)

var cmdRecord = &Command{
	Run:   runRecord,
	Usage: "record <command> [<args>]",
	Short: "Create, modify, or view records",
	Long: `
Create, modify, or view records

Usage:

  force record get <object> <id>

  force record create <object> [<fields>]

  force record update <object> <id> [<fields>]

  force record delete <object> <id>

Examples:

  force record get User 00Ei0000000000

  force record create User Name:"<NAME>" Phone:0000000000

  force record update User 00Ei0000000000 State:GA

  force record delete User 00Ei0000000000
`,
}

func runRecord(cmd *Command, args []string) {
	switch args[0] {
	case "get":
		runRecordGet(args[1:])
	case "create":
		runRecordCreate(args[1:])
	case "update":
		runRecordUpdate(args[1:])
	case "delete":
		runRecordDelete(args[1:])
	default:
		ErrorAndExit("so such subcommand for record: %s", args[0])
	}
}

func runRecordGet(args []string) {
	if len(args) != 2 {
		ErrorAndExit("must specify object and id")
	}
	force, _ := ActiveForce()
	object, err := force.GetRecord(args[0], args[1])
	if err != nil {
		ErrorAndExit(err.Error())
	} else {<commit_msg>fix bare force record case<commit_after>package main

import (
	"fmt"
)

var cmdRecord = &Command{
	Run:   runRecord,
	Usage: "record <command> [<args>]",
	Short: "Create, modify, or view records",
	Long: `
Create, modify, or view records

Usage:

  force record get <object> <id>

  force record create <object> [<fields>]

  force record update <object> <id> [<fields>]

  force record delete <object> <id>

Examples:

  force record get User 00Ei0000000000

  force record create User Name:"<NAME>" Phone:0000000000

  force record update User 00Ei0000000000 State:GA

  force record delete User 00Ei0000000000
`,
}

func runRecord(cmd *Command, args []string) {
	if len(args) == 0 {
		cmd.printUsage()
	} else {
		switch args[0] {
		case "get":
			runRecordGet(args[1:])
		case "create":
			runRecordCreate(args[1:])
		case "update":
			runRecordUpdate(args[1:])
		case "delete":
			runRecordDelete(args[1:])
		default:
			ErrorAndExit("no such command: %s", args[0])
		}
	}
}

func runRecordGet(args []string) {
	if len(args) != 2 {
		ErrorAndExit("must specify object and id")
	}
	force, _ := ActiveForce()
	object, err := force.GetRecord(args[0], args[1])
	if err != nil {
		ErrorAndExit(err.Error())
	} else {
{'fraction_non_alphanumeric': 0.14050632911392405, 'fraction_numerical': 0.04683544303797468, 'mean_word_length': 4.37641723356009, 'pattern_counts': {'":': 8, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, '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': '552979', 'n_tokens_mistral': 949, 'n_tokens_neox': 814, 'n_words': 245}