Skip to content

Commit

Permalink
cleaning up the doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rangertaha committed Nov 26, 2024
1 parent 6a97e33 commit d9952aa
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 206 deletions.
5 changes: 3 additions & 2 deletions internal/plugins/algorithms/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import (
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/aci"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/acs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/bf"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cb"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cm"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cns"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/co"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/com"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cr"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/cs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/dcar"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/dhs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/di"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/do"
Expand All @@ -21,7 +20,9 @@ import (
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/ho"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/hr"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/hs"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/kr"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/ons"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/rar"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/si"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/sp"
_ "github.com/rangertaha/urlinsane/internal/plugins/algorithms/tld"
Expand Down
73 changes: 0 additions & 73 deletions internal/plugins/algorithms/com/com.go

This file was deleted.

15 changes: 0 additions & 15 deletions internal/plugins/algorithms/com/com_test.go

This file was deleted.

84 changes: 0 additions & 84 deletions internal/plugins/algorithms/dcar/dcar.go

This file was deleted.

15 changes: 0 additions & 15 deletions internal/plugins/algorithms/dcar/dcar_test.go

This file was deleted.

20 changes: 3 additions & 17 deletions pkg/typo/typo.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ func RepetitionAdjacentReplacement(token string, keyboard ...string) (tokens []s
}
}
}
// }
return
}

Expand Down Expand Up @@ -359,13 +358,9 @@ func HomoglyphSwapping(token string, homoglyphs map[string][]string) (tokens []s

// BitFlipping involves altering the binary representation of characters in a
// token by flipping one or more bits. This technique introduces subtle changes
//
// to the characters, which can result in visually similar but distinct tokens.
//
// For example, flipping a single bit in the character "a" might produce a
//
// different character entirely, such as "b", creating variants that are hard
//
// to detect visually but differ in encoding.
func BitFlipping(token string, graphemes ...string) (variations []string) {
// Flip a single bit in a byte
Expand All @@ -391,7 +386,6 @@ func BitFlipping(token string, graphemes ...string) (variations []string) {
// tokens that are similar to the original but with a different sequence,
// which can be used to confuse or mislead users. For example, the token
// "2024example" could be altered to "example2024", or "shop-online" could
//
// become "online-shop", where the elements are swapped in position.
func TokenOrderSwap(token string, tokens []string) (variations []string) {

Expand Down Expand Up @@ -446,10 +440,8 @@ func CardinalSwap(token string, numerals map[string][]string) (variations []stri
// OrdinalSwap involves substituting numerical digits with their corresponding
// ordinal word forms, or converting ordinal words back into numerical digits.
// This technique generates variations by switching between numeric and
//
// word-based representations of ordinals. For example, the token "file2" could
// be transformed into "filesecond", or "chapterthird" might be altered to
//
// "chapter3".
func OrdinalSwap(token string, numerals map[string][]string) (variations []string) {
var fn func(map[string]string, string, bool) map[string]bool
Expand Down Expand Up @@ -492,15 +484,9 @@ func OrdinalSwap(token string, numerals map[string][]string) (variations []strin
return
}

// DotDashUnderscoreSub involves replacing dots (.), dashes (-), and
// underscores (_) in a given token with one another to produce alternative
// variants that closely resemble the original token. This technique is commonly
// applied in contexts like package names or identifiers, where these characters
// are frequently used for separation. For example, a token such as
// "my-package.name" might be altered to "my_package_name", "my.package-name",
// or "my-package_name", creating slight variations that can be easily mistaken
// for the original.
func DotDashUnderscoreSub(token string) (variations []string) {
// DHUSubstitution substitutes (.-_) in a given token to produce variants that
// look similar. Primarily used in package tokens
func DHUSubstitution(token string) (variations []string) {

return
}
Expand Down

0 comments on commit d9952aa

Please sign in to comment.