TDUBus

package module
v0.0.0-...-778c40d Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 6 Imported by: 0

README

TDUBus

version:1.0

A package for getting bus timetable of TDU

test:2018-01-31

Function

GetTimeSchedules()
  • return value : []BusTimes

Usage

Monday ~ Friday
 timetable := TDUBus.GetTimeSchedules()
 fmt.Println(timetable[0])

// go to university from Takasaka
 fmt.Println(timetable[0].Up.Takasaka)

// go to Takasaka from university
 fmt.Println(timetable[0].Down.Takasaka)

// go to Takasaka from university (about ten o'clock)
 fmt.Println(timetable[0].Down.Takasaka["10"])

Saturday
 timetable := TDUBus.GetTimeSchedules()
 fmt.Println(timetable[1])

// go to university from Takasaka
 fmt.Println(timetable[1].Up.Takasaka)

// go to Takasaka from university
 fmt.Println(timetable[1].Down.Takasaka)

// go to Takasaka from university (about ten o'clock)
 fmt.Println(timetable[1].Down.Takasaka["10"])

Vacation (Monday ~ Friday)
 timetable := TDUBus.GetTimeSchedules()
 fmt.Println(timetable[2])

// go to university from Takasaka
 fmt.Println(timetable[2].Up.Takasaka)

// go to Takasaka from university
 fmt.Println(timetable[2].Down.Takasaka)

// go to Takasaka from university (about ten o'clock)
 fmt.Println(timetable[2].Down.Takasaka["10"])

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BusTimes

type BusTimes struct {
	Up   Schedule
	Down Schedule
}

func GetTimeSchedules

func GetTimeSchedules() []BusTimes

type Cli

type Cli struct {
}

func (*Cli) NextDown

func (c *Cli) NextDown(station string) ([]string, []string)

type Schedule

type Schedule struct {
	Takasaka   map[string][]string
	Kitasakado map[string][]string
	Kumagaya   map[string][]string
	Kounosu    map[string][]string
}

Jump to

Keyboard shortcuts

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