<commit_before>package main

import (
	"fmt"

	"code.cloudfoundry.org/cli/cf/api/appinstances"
	"code.cloudfoundry.org/cli/cf/api/resources"
	"code.cloudfoundry.org/cli/cf/configuration/coreconfig"
	"code.cloudfoundry.org/cli/cf/models"
	"code.cloudfoundry.org/cli/cf/net"
)

// AppRepo provides functionality to query a Cloud Foundry API for applications.
type AppRepo struct {
	config  coreconfig.Reader
	gateway net.Gateway
}

// NewAppRepo returns a new SpaceRepo which internally uses the specified
// coreconfig.Repository and net.Gateway.
func NewAppRepo(config coreconfig.Repository, gateway net.Gateway) (repo AppRepo) {
	repo.config = config
	repo.gateway = gateway
	return
}

// ListApps lists all applicaitons in the organisation. For each application, it
// calls the provided callback function.
func (ar AppRepo) ListApps(callback func(models.Application) bool) error {
	return ar.gateway.ListPaginatedResources(
		ar.config.APIEndpoint(),
		"/v2/apps",
		resources.ApplicationResource{},<commit_msg>Fix typo<commit_after>package main

import (
	"fmt"

	"code.cloudfoundry.org/cli/cf/api/appinstances"
	"code.cloudfoundry.org/cli/cf/api/resources"
	"code.cloudfoundry.org/cli/cf/configuration/coreconfig"
	"code.cloudfoundry.org/cli/cf/models"
	"code.cloudfoundry.org/cli/cf/net"
)

// AppRepo provides functionality to query a Cloud Foundry API for applications.
type AppRepo struct {
	config  coreconfig.Reader
	gateway net.Gateway
}

// NewAppRepo returns a new SpaceRepo which internally uses the specified
// coreconfig.Repository and net.Gateway.
func NewAppRepo(config coreconfig.Repository, gateway net.Gateway) (repo AppRepo) {
	repo.config = config
	repo.gateway = gateway
	return
}

// ListApps lists all applications in the organisation. For each application, it
// calls the provided callback function.
func (ar AppRepo) ListApps(callback func(models.Application) bool) error {
	return ar.gateway.ListPaginatedResources(
		ar.config.APIEndpoint(),
		"/v2/apps",
		resources.ApplicationResource{},
{'fraction_non_alphanumeric': 0.1028175976272862, 'fraction_numerical': 0.0009886307464162135, 'mean_word_length': 4.75, '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': '2935574', 'n_tokens_mistral': 641, 'n_tokens_neox': 646, 'n_words': 160}