# How to use a function in a module without specifying the module name

**URL:** <https://discourse.julialang.org/t/how-to-use-a-function-in-a-module-without-specifying-the-module-name/55942>\
**Category:** General Usage\
**Created:** [February 24, 2021, 4:29pm UTC](https://discourse.julialang.org/t/how-to-use-a-function-in-a-module-without-specifying-the-module-name/55942 "2021-02-24T16:29:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon60034542](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@anon60034542](https://discourse.julialang.org/u/anon60034542)\
**Post date:** [February 24, 2021, 4:29pm UTC](https://discourse.julialang.org/t/how-to-use-a-function-in-a-module-without-specifying-the-module-name/55942/1 "2021-02-24T16:29:34Z")

</div>

I have the following folder and module

```julia
ExampleFolder
    - SampleModule.jl
- main.jl

```

main:

```julia
import .Example

function main()
    println(Example.greet_user("Svetlana"))
end

main()

```

Is there a way I can say `println(greet_user())` without doing `Example.greet_user()`? When you do it as `Example.greet_user()` does it avoid naming conflicts if the same method exists in another module?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [February 24, 2021, 4:41pm UTC](https://discourse.julialang.org/t/how-to-use-a-function-in-a-module-without-specifying-the-module-name/55942/2 "2021-02-24T16:41:01Z")

</div>

> [@anon60034542](#):
>
> Is there a way

yes, you need to `export` in the module and import in your code with `using`.

> [@anon60034542](#):
>
> does it avoid naming conflicts

also yes
