# XO0602: import path does not yield a valid local name

An import binds its last path segment as the local name, with `-` replaced by `_`. For a Go package the local name is the Go package name. If the result is still not a valid identifier, or is a keyword, give the import a name with `as`. See core 4.1.

## Example

```xo
// main/main.xo, with a module directory 03-lib
use example.com/app/03-lib

fn f() -> Int { 1 }
```

## Fix

```xo
use example.com/app/03-lib as lib

fn f() -> Int { lib.one() }
```

Run `xo explain XO0602` for this text in a terminal, or see
[section 10.6 of the specification](../../spec/core/#106-diagnostic-codes).

