<commit_before>// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fetch

import "golang.org/x/mod/module"

// knownAlternatives lists module paths that are known to be forks of other
// modules.
// For example, github.com/msopentech/azure-sdk-for-go
// is an alternative to github.com/Azure/azure-sdk-for-go.
// Map keys are case-sensitive and should not include a final major version
// like "/v3" or ".v3" for gopkg.in paths.
//
// When a module has a go.mod file, we can detect alternatives by comparing the
// module path with the path in the go.mod file. This list is for modules
// without go.mod files.
var knownAlternatives = map[string]string{
	"github.com/msopentech/azure-sdk-for-go":       "github.com/Azure/azure-sdk-for-go",
	"github.com/MSOpenTech/azure-sdk-for-go":       "github.com/Azure/azure-sdk-for-go",
	"gopkg.in/Azure/azure-sdk-for-go":              "github.com/Azure/azure-sdk-for-go",
	"github.com/masslessparticle/azure-sdk-for-go": "github.com/Azure/azure-sdk-for-go",
	"github.com/aliyun/alibaba-cloud-sdk-go":       "github.com/Azure/azure-sdk-for-go",
	"github.com/johnstairs/azure-sdk-for-go	": "github.com/Azure/azure-sdk-for-go",
	"github.com/shopify/sarama": "github.com/Shopify/sarama",
}

// knownAlternativeFor returns the module that the given module path is an alternative to,
// or the empty string if there is no such module.
//
// It consults the knownAlternatives map, ignoring version suffixes.
func knownAlternativeFor(modulePath string) string {
	key, _, ok := module.SplitPathVersion(modulePath)
	if !ok {
		return ""
	}
	return knownAlternatives[key]
}
<commit_msg>internal/fetch: add another known alternative module<commit_after>// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fetch

import "golang.org/x/mod/module"

// knownAlternatives lists module paths that are known to be forks of other
// modules.
// For example, github.com/msopentech/azure-sdk-for-go
// is an alternative to github.com/Azure/azure-sdk-for-go.
// Map keys are case-sensitive and should not include a final major version
// like "/v3" or ".v3" for gopkg.in paths.
//
// When a module has a go.mod file, we can detect alternatives by comparing the
// module path with the path in the go.mod file. This list is for modules
// without go.mod files.
var knownAlternatives = map[string]string{
	"github.com/msopentech/azure-sdk-for-go":       "github.com/Azure/azure-sdk-for-go",
	"github.com/MSOpenTech/azure-sdk-for-go":       "github.com/Azure/azure-sdk-for-go",
	"gopkg.in/Azure/azure-sdk-for-go":              "github.com/Azure/azure-sdk-for-go",
	"gopkg.in/azure/azure-sdk-for-go":              "github.com/Azure/azure-sdk-for-go",
	"github.com/masslessparticle/azure-sdk-for-go": "github.com/Azure/azure-sdk-for-go",
	"github.com/aliyun/alibaba-cloud-sdk-go":       "github.com/Azure/azure-sdk-for-go",
	"github.com/johnstairs/azure-sdk-for-go	": "github.com/Azure/azure-sdk-for-go",
	"github.com/shopify/sarama": "github.com/Shopify/sarama",
}

// knownAlternativeFor returns the module that the given module path is an alternative to,
// or the empty string if there is no such module.
//
// It consults the knownAlternatives map, ignoring version suffixes.
func knownAlternativeFor(modulePath string) string {
	key, _, ok := module.SplitPathVersion(modulePath)
	if !ok {
		return ""
	}
	return knownAlternatives[key]
}

{'fraction_non_alphanumeric': 0.1305439330543933, 'fraction_numerical': 0.0033472803347280333, 'mean_word_length': 3.476903870162297, 'pattern_counts': {'":': 15, '<': 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': '3729755', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1169, 'n_words': 333}