title: How to access another function of package main in another file?
body: <p>this is my file tree:</p>
  
  <pre><code>.
  ├── float.go
  └── main.go
  </code></pre>
  
  <p>main.go:</p>
  
  <pre><code>package main
  
  func main(){
      Float()
  }
  </code></pre>
  
  <p>float.go:</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func Float(){
      fmt.Println( "hello world")
  }
  </code></pre>
  
  <p>when I try to compile the main.go, it throws an error </p>
  
  <blockquote>
    <p>command-line-arguments ./main.go:4:2: undefined: Float</p>
  </blockquote>
  
  <p>Why can't I use the function defined in another file of same packages?</p>