Skip to content

Commit

Permalink
docs(readme): add example usages section
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Apr 24, 2024
1 parent 2889938 commit cf79537
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ This module can be integrated into a CMake project in the following ways:
include("${SetupGo_SOURCE_DIR}/cmake/SetupGo.cmake")
```

## Example Usages

This example demonstrates how to set up the latest version of Go to be used in a CMake project:

```cmake
setup_go()
execute_process(COMMAND ${GO_EXECUTABLE} version)
```

### Specify Go Version

Use the `VERSION` argument to specify the Go version to set up:

```cmake
setup_go(VERSION 1.21.9)
```

## License

This project is licensed under the terms of the [MIT License](./LICENSE).
Expand Down

0 comments on commit cf79537

Please sign in to comment.