lenconv

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: AGPL-3.0 Imports: 1 Imported by: 1

README

Ft to Meter and Meter to Ft converter usage

  1. Create app.go file (touch app.go):
package main

import(
  "os"
  "fmt"
  "github.com/unixlinuxgeek/lenconv"
)

func main() {
  if len(os.Args) > 1 {
    m := lenconv.FtToMet(1)
    fmt.Printf("%v ft. equal %v\n", os.Args[1], m)
  }
}
  1. Installing dependency:
go get github.com/unixlinuxgeek/lenconv
  1. Run:
go run ./app.go

Example:

$ go run  ./app.go 1
1 ft. equal 0.30478512648582745 Meter

Example 2 (create binary file):

$ go build  ./app.go
$ ./app 1
1 ft. equal 0.30478512648582745 Meter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ft

type Ft float64

func MetToFt

func MetToFt(m Meter) Ft

умножаем значение длины на 3.281

func (Ft) String

func (f Ft) String() string

type Meter

type Meter float64

func FtToMet

func FtToMet(f Ft) Meter

делим значение длины на 3.281

func (Meter) String

func (m Meter) String() string

Jump to

Keyboard shortcuts

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