Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- utils(pkg)
- | auth.go (has a function names test1)
- controllers(pkg)
- | login.go (has a function names test2)
- import "../utils"
- func test2(c *gin.Context) bool{
- utils.test1()
- }
- package utils
- func Test1() string {
- return "Test1"
- }
- package controllers
- import "project1/utils"
- func Test2() string {
- return utils.Test1()
- }
- package main
- import (
- "fmt"
- "project1/controllers"
- )
- func main() {
- fmt.Println(controllers.Test2())
- }
- Test1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement