Skip to content
Snippets Groups Projects
Commit 4331e918 authored by Hugo NOUTS's avatar Hugo NOUTS
Browse files

casting bytes to strings

parent 25314fb3
No related branches found
No related tags found
No related merge requests found
Pipeline #5003 passed
......@@ -75,9 +75,9 @@ func main() {
}
usageEndIndex += 30
pageCode := []byte(pageContent[codeStartIndex:codeEndIndex])
pageState := []byte(pageContent[stateStartIndex:stateEndIndex])
pageUsage := []byte(pageContent[usageStartIndex:usageEndIndex])
pageCode := string([]byte(pageContent[codeStartIndex:codeEndIndex]))
pageState := string([]byte(pageContent[stateStartIndex:stateEndIndex]))
pageUsage := string([]byte(pageContent[usageStartIndex:usageEndIndex]))
// Print out the result
fmt.Printf("Page code: %s\n", pageCode)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment