Skip to content

AngelODeath/grow-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GrowPlayer

My little golang video player. Built on fyne.

Uses toml configuration file

Go

Shell Script

GitHub Actions

Notion

Documentation

Writing a Go App or Library:

Use go to initialize the project modules:

The following examples show how to set up a blank project properly.

Command:

go mod

Example:

  • To create a new application, initialize a module in an empty directory:

    cd ~/Dev
    mkdir my-example-app
    cd my-example-app
    go mod init github.com/yourname/yourgame
    touch main.go
  • To create a new library, initialize a submodule inside the application directory:

    cd ~/Dev/my-example-app
    mkdir libs
    cd libs
    go mod init github.com/yourname/yourgamelibs
    touch helpers.go

Adding packages:

Use go to add project dependencies (requirements):

The following examples show how to add both public packages and local modules.

Add a public package residing on github:

Command:

go get

Package:

github.com/pelletier/go-toml/v2

Repository:

Example:

  • Add package github.com/pelletier/go-toml/v2 to module dependencies:

    go get github.com/pelletier/go-toml/v2

Add a local module residing in the libs directory:

This is best done manually by editing the files and adding the following lines:

Example:

  • Add these two lines to the file: go.mod

    replace example.com/yourname/library => ./libs

    require example.com/yourname/library v0.0.0

  • Add an import line to the file: main.go

    import libalias "example.com/yourname/library"

My commands:

build (full):

go build -v -x -a .

build (quick):

go build -v -x .

Check binary:

echo Working directory: `pwd` (`dirs`)
echo File path: ./grow-player
echo Real path: `realpath ./grow-player`
echo File size: `du -h ./grow-player | awk '{print $1}'`
echo File signature: `file ./grow-player`

Launch:

./grow-player

Check GOPATH:

echo GOPATH: $GOPATH

Links and Tutorials:

Intro to modules on go - part-1:

Dev.to blog

Using Modules and Packages in Go

levelup.gitconnected.com/using-modules-and-packages-in-go

Support me if you like what I do:

Github-sponsors

Contact

You can reach me on email:

Outlook

Or catch me on youtube:

YouTube

License

Licence
MIT

About

My little golang video player.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published