Skip to content

Commit

Permalink
解决自定义包无法引用问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob4F committed Sep 3, 2019
1 parent 3e0af2d commit 46e9d54
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 61 deletions.
12 changes: 12 additions & 0 deletions learn/Main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package main

// 引用自定义包
import unit "go_baselearn/learn/unit"

/*
* 程序启动入口类
*/
func main() {
// 调用其他包下方法
unit.LearnMap()
}
1 change: 0 additions & 1 deletion src/main/unit/Chapterone.go → learn/unit/Chapterone.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ func learnmap(){
ff.Println("process private method")
}


func LearnMap(){
// init map
_dict := make(map[string]int)
Expand Down
5 changes: 0 additions & 5 deletions src/app.go

This file was deleted.

55 changes: 0 additions & 55 deletions src/main/main.go

This file was deleted.

0 comments on commit 46e9d54

Please sign in to comment.