mirror of https://github.com/go-python/gopy.git
Merge pull request #355 from testwill/strings
unconditional use strings.TrimSuffix
This commit is contained in:
commit
5f285b8900
|
@ -198,12 +198,8 @@ else:
|
|||
fmt.Printf("no LibPy -- set to: %s\n", raw.LibPy)
|
||||
}
|
||||
|
||||
if strings.HasSuffix(raw.LibPy, ".a") {
|
||||
raw.LibPy = raw.LibPy[:len(raw.LibPy)-len(".a")]
|
||||
}
|
||||
if strings.HasPrefix(raw.LibPy, "lib") {
|
||||
raw.LibPy = raw.LibPy[len("lib"):]
|
||||
}
|
||||
raw.LibPy = strings.TrimSuffix(raw.LibPy, ".a")
|
||||
raw.LibPy = strings.TrimPrefix(raw.LibPy, "lib")
|
||||
|
||||
cfg.Version = raw.Version
|
||||
cfg.ExtSuffix = raw.ExtSuffix
|
||||
|
|
Loading…
Reference in New Issue