Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e95c440d3 | |||
| df8692ed4d | |||
| 3251ba433d |
@@ -0,0 +1,23 @@
|
||||
name: test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: "27.1.2"
|
||||
gleam-version: "1.12.0"
|
||||
rebar3-version: "3"
|
||||
# elixir-version: "1"
|
||||
- run: gleam deps download
|
||||
- run: gleam test
|
||||
- run: gleam format --check src test
|
||||
@@ -1,5 +1,21 @@
|
||||
# musicplayer
|
||||
|
||||
[](https://hex.pm/packages/musicplayer)
|
||||
[](https://hexdocs.pm/musicplayer/)
|
||||
|
||||
```sh
|
||||
gleam add musicplayer@1
|
||||
```
|
||||
```gleam
|
||||
import musicplayer
|
||||
|
||||
pub fn main() -> Nil {
|
||||
// TODO: An example of the project in use
|
||||
}
|
||||
```
|
||||
|
||||
Further documentation can be found at <https://hexdocs.pm/musicplayer>.
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
|
||||
+4
-1
@@ -27,7 +27,10 @@ pub fn connect(socket_path: String) -> Result(Socket, IPCError) {
|
||||
// timeout in ms
|
||||
let timeout = 1000
|
||||
|
||||
gen_tcp_connect(Local(socket_path), 0, options, timeout)
|
||||
case gen_tcp_connect(Local(socket_path), 0, options, timeout) {
|
||||
Error(err) -> Error(err)
|
||||
Ok(socket) -> Ok(socket)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn send(socket: Socket, message: String) -> Result(Nil, IPCError) {
|
||||
|
||||
Reference in New Issue
Block a user