treasure-hunt

command module
v0.0.0-...-a019c0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2021 License: MIT Imports: 4 Imported by: 0

README

treasure-hunt

simple command-line program for helping the user hunt for a treasure that satisfies

Config & Dependencies

  • go v1.16.3
  • labstack/echo v3.3.10+incompatible
  • spf13/viper v1.7.1

File & Directory

  • config, used to define all existing configurations
  • models, used to create data models that will be used by the program
  • routes, used for routing and therein is useful as data controllers, including business logic
  • services, a place where a function will be used by the program: validation, program behavior to other needs
  • config.json, contains the configuration for the program
  • main.go, the main program code to be executed

How to Use

  • run code in the main directory of this program : go run main.go
  • then, hit endpoint http://localhost:3698/lets-hunt with POST method and body raw data json

    {
        "track" : [
            ["#",".","#","#","#","#","#","#"],
            ["#",".",".",".",".",".",".","#"],
            ["#",".","#","#","#",".",".","#"],
            ["#",".",".",".","#",".","#","#"],
            ["#",".","#",".",".",".",".","#"],
            ["#","#","#","#","#","#","#","#"]
        ],
        "playerPosition" : "4,1"
    }

  • result Screenshot from 2021-05-03 00-34-02

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL