MM-31063: Change constants to use CamelCase (#16608)

* MM-31063: Change constants to use CamelCase

* store package

* change allcaps to camel case (#16615)

* New tools.mod

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
Agniva De Sarker
2021-01-04 11:32:29 +05:30
коммит произвёл GitHub
родитель 8b6ac5f5d2
Коммит c1dd23a3c8
158 изменённых файлов: 1485 добавлений и 1479 удалений

Просмотреть файл

@@ -14,7 +14,7 @@ const (
)
// Strings that should pass as acceptable posts
var FUZZY_STRINGS_POSTS = []string{
var FuzzyStringsPosts = []string{
`**[1] - [Markdown Tests]**
_italics_
more _italics_
@@ -367,7 +367,7 @@ This is a link to http://example.com.
}
// Strings that should pass as acceptable team names
var FUZZY_STRINGS_NAMES = []string{
var FuzzyStringsNames = []string{
"*",
"?",
".",
@@ -426,7 +426,7 @@ var FUZZY_STRINGS_NAMES = []string{
}
// Strings that should pass as acceptable emails
var FUZZY_STRINGS_EMAILS = []string{
var FuzzyStringsEmails = []string{
"sue@thatmightbe",
"sue@thatmightbe.c",
"sue@thatmightbe.co",
@@ -439,7 +439,7 @@ var FUZZY_STRINGS_EMAILS = []string{
}
// Lovely giberish for all to use
const GIBBERISH_TEXT = `
const GibberishText = `
Thus one besides much goodness shyly far some hyena overtook since rhinoceros nodded withdrew wombat before deserved apart a alongside the far dalmatian less ouch where yet a salmon.
Then jeez far marginal hey aboard more as leaned much oversold that inside spoke showed much went crud close save so and and after and informally much lion commendably less conductive oh excepting conductive compassionate jeepers hey a much leopard alas woolly untruthful outside snug rashly one cunning past fabulous adjusted far woodchuck and and indecisive crud loving exotic less resolute ladybug sprang drank under following far the as hence passably stolidly jeez the inset spaciously more cozily fishily the hey alas petted one audible yikes dear preparatory darn goldfinch gosh a then as moth more guinea.
Timid mislaid as salamander yikes alas ouch much that goldfinch shark in before instead dear one swore vivid versus one until regardless sang panther tolerable much preparatory hardily shuddered where coquettish far sheep coarsely exaggerated preparatory because cordial awesome gradually nutria that dear mocking behind off staunchly regarding a the komodo crud shrewd well jeez iguanodon strove strived and moodily and sought and and mounted gosh aboard crud spitefully boa.
@@ -481,7 +481,7 @@ func RandString(l int, charset string) string {
// }
// func FuzzEmail() string {
// return FUZZY_STRINGS_EMAILS[RandIntFromRange(Range{0, len(FUZZY_STRINGS_EMAILS) - 1})]
// return FuzzyStringsEmails[RandIntFromRange(Range{0, len(FuzzyStringsEmails) - 1})]
// }
func RandomName(length Range, charset string) string {
@@ -490,7 +490,7 @@ func RandomName(length Range, charset string) string {
}
func FuzzName() string {
return FUZZY_STRINGS_NAMES[RandIntFromRange(Range{0, len(FUZZY_STRINGS_NAMES) - 1})]
return FuzzyStringsNames[RandIntFromRange(Range{0, len(FuzzyStringsNames) - 1})]
}
// Random selection of text for post
@@ -498,12 +498,12 @@ func RandomText(length Range, hashtags Range, mentions Range, users []string) st
textLength := RandIntFromRange(length)
numHashtags := RandIntFromRange(hashtags)
numMentions := RandIntFromRange(mentions)
if textLength > len(GIBBERISH_TEXT) || textLength < 0 {
textLength = len(GIBBERISH_TEXT)
if textLength > len(GibberishText) || textLength < 0 {
textLength = len(GibberishText)
}
startPosition := RandIntFromRange(Range{0, len(GIBBERISH_TEXT) - textLength - 1})
startPosition := RandIntFromRange(Range{0, len(GibberishText) - textLength - 1})
words := strings.Split(GIBBERISH_TEXT[startPosition:startPosition+textLength], " ")
words := strings.Split(GibberishText[startPosition:startPosition+textLength], " ")
for i := 0; i < numHashtags; i++ {
randword := RandIntFromRange(Range{0, len(words) - 1})
words = append(words, " #"+words[randword])
@@ -525,5 +525,5 @@ func RandomText(length Range, hashtags Range, mentions Range, users []string) st
}
func FuzzPost() string {
return FUZZY_STRINGS_POSTS[RandIntFromRange(Range{0, len(FUZZY_STRINGS_POSTS) - 1})]
return FuzzyStringsPosts[RandIntFromRange(Range{0, len(FuzzyStringsPosts) - 1})]
}