https://github.com/akbarfa49/farify
https://github.com/akbarfa49/farify
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/akbarfa49/farify
- Owner: akbarfa49
- Created: 2022-03-13T14:33:55.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-14T18:30:56.000Z (almost 4 years ago)
- Last Synced: 2025-05-22T18:33:14.371Z (8 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Farify
a simple tools for purify your go code from contamination based on our standard.
## Install
requires [Golang](//golang.org/)
```
go install github.com/akbarfa49/farify@latest
```
### Example for replace Double Quote with Grave Accent
Example using CLI
```
$ echo 'package test
import (
"fmt"
"testing"
)
func TestEsteh(t *testing.T) {
leaderboardhtml := "edsadhkjasdgjashgfdhasvfdshav"
leaderboardhtml += "sadsadgsjhabdas" + `"dasdsa` + "dsadsada"
leaderboardhtml += ``
leaderboardhtml += `` + leaderboardhtml + ``
leaderboardhtml += `` + leaderboardhtml + ``
leaderboardhtml += `` + leaderboardhtml + ``
leaderboardhtml += `
`
fmt.Printf("hello %.2f", 69.123121)
}
' > duar_test.go
$ farify doublequote --file duar_test.go
Done 2 replacement
$ cat duar_test.go
package test
import (
"fmt"
"testing"
)
func TestEsteh(t *testing.T) {
leaderboardhtml := `edsadhkjasdgjashgfdhasvfdshav`
leaderboardhtml += `sadsadgsjhabdas` + `"dasdsa` + `dsadsada`
leaderboardhtml += ``
leaderboardhtml += `` + leaderboardhtml + ``
leaderboardhtml += `` + leaderboardhtml + ``
leaderboardhtml += `` + leaderboardhtml + ``
leaderboardhtml += `
`
fmt.Printf(`hello %.2f`, 69.123121)
}
```
Example using go:generate
```
//go:generate farify doublequote --file duar.go
```