For string operation, the string is taken a common,
When you need to intercept a portion of the string, as may be used to operate as a part of the array taken, the following sample code:
package main
import "fmt"
func main() {
str := "XBodyContentX"
content := str[1 : len(str)-1]
fmt.Println(content)
}
Run results: BodyContent