As a hint, if you used strings.TrimLeft(file, "/amprtv") then your
program would work the same.
Dave.
On Sunday, October 30, 2011 8:07:01 PM UTC-4, Archos wrote:It looks that strings.TrimLeft has a bug since it is removing an extra
character
===
package main
import (
"fmt"
"strings"
)
func main() {
file := "/var/tmp/servoconf/"
fmt.Println(strings.TrimLeft(file, "/var/tmp"))
}
===
The ouput is `servoconf/` but it's expected `/servoconf/`
It's also worth noticing that the original post was from October 2011.