```go
fmt.Println("创建子目录")
err := os.Mkdir(path, 0766)
```
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4a5b61]
goroutine 1 [running]:
main.CreateHomeworkDir(0x4e2cc7, 0x2a, 0x4dd2b9, 0x8, 0x4ddc6e, 0xc)
/home/liushiyi/goworkspace/src/dirtest/main.go:168 +0x551
main.TestDeCompress()
/home/liushiyi/goworkspace/src/dirtest/main.go:214 +0x60
main.main()
/home/liushiyi/goworkspace/src/dirtest/main.go:228 +0x70
```
错误: 进程退出代码 2.
有疑问加站长微信联系(非本文作者)