Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

ThoughtWorksInc/developer-joyofenergy-Golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Overview

This is a Golang implementation of the Joy of Energy project, which provides functionality for managing meter readings, calculating energy usage, and comparing price plans.

Project Structure

  • src/: Source code for the application
    • config/: Configuration files for price plans and test data
    • meters/: Meter-related functionality
    • pricePlans/: Price plan comparison logic
    • readings/: Reading storage and retrieval
    • usage/: Usage calculation services
  • tests/: Unit tests for each module

Prerequisites

  • Go 1.21 or higher

Running the Project

  1. Clone the repository
  2. Navigate to the project directory
  3. Rungo mod tidy to download dependencies
  4. Run the application withgo run src/app.go

Running Tests

Execute all tests with:

gotest ./tests/...

Project Components

  • Meter Service: Manages meter creation and retrieval
  • Reading Service: Stores and retrieves meter readings
  • Price Plan Comparator: Calculates costs for different price plans
  • Usage Service: Calculates total energy usage for a meter

Example Usage

The main application demonstrates:

  • Creating meters
  • Storing meter readings
  • Calculating total usage
  • Comparing price plans

License

[Add your license information here]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp