1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 05:11:06 +02:00
This commit is contained in:
Alberto Chiaravalli 2025-09-26 16:31:17 +02:00
parent 990696e419
commit 83aef2eac5
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -36,7 +36,7 @@ func Run() (err error) {
app := cli.NewApp()
app.Name = "croc"
if Version == "" {
Version = "v10.2.5"
Version = "v-990696e"
}
app.Version = Version
app.Compiled = time.Now()

View file

@ -528,7 +528,7 @@ main() {
local autocomplete_install_rcode
croc_bin_name="croc"
croc_version="10.2.5"
croc_version=""
croc_dl_ext="tar.gz"
croc_base_url="https://github.com/schollz/croc/releases/download"
prefix="${1}"

View file

@ -46,7 +46,7 @@ func replaceInFile(fname, start, end, replacement string) (err error) {
if err != nil {
return
}
oldVersion := GetStringInBetween(string(b), start, end)
oldVersion := getStringInBetween(string(b), start, end)
if oldVersion == "" {
err = fmt.Errorf("nothing")
return
@ -61,8 +61,8 @@ func replaceInFile(fname, start, end, replacement string) (err error) {
return
}
// GetStringInBetween Returns empty string if no start string found
func GetStringInBetween(str string, start string, end string) (result string) {
// getStringInBetween Returns empty string if no start string found
func getStringInBetween(str, start, end string) (result string) {
s := strings.Index(str, start)
if s == -1 {
return