Fixed errors in lifetimes.go.

This commit is contained in:
Pietro Gagliardi 2015-04-18 11:01:30 -04:00
parent 1560ef34c7
commit 0126b860ba
1 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,8 @@ import (
) )
func toaddr(s string) uintptr { func toaddr(s string) uintptr {
n, err := strconv.Itoa(s) // TODO verify this call
n, err := strconv.ParseUint(s, 0, 0)
if err != nil { if err != nil {
panic(err) panic(err)
} }
@ -127,7 +128,7 @@ func destroy(parts []string) {
func main() { func main() {
b := bufio.NewScanner(os.Stdin) b := bufio.NewScanner(os.Stdin)
for b.Scan() { for b.Scan() {
s := b.String() s := b.Text()
parts := strings.Split(s, " ") parts := strings.Split(s, " ")
name := parts[0] name := parts[0]
switch { switch {