Changeset 9 in code for trunk/main.go


Ignore:
Timestamp:
Feb 11, 2023, 11:04:52 AM (2 years ago)
Author:
koizumi.aoi
Message:

doc: target language is no longer required, put usage notes on readme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/main.go

    r8 r9  
    1 // $KyokoNet: stcli,v 1.3 2022/12/13 23:57:00 akoizumi Exp
     1// $TheSupernovaDuo: stcli,v 1.3.1 2023/02/11 07:54:25 akoizumi Exp
    22// Command line client for SimplyTranslate, a privacy friendly frontend to other translation engines
    33package main
     
    3333        // Check if any of those two variables is empty.
    3434        // It actually needs the two to have content.
    35         if len(input) == 0 || len(to) == 0 {
    36                 log.Fatal("Missing either the text or the target language.")
     35        if len(input) == 0 {
     36                log.Fatal("Missing input.")
    3737        }
    3838        // Map a variable to the struct
     
    4545        sanityCheck(err)
    4646        defer resp.Body.Close()
     47        // JSON decoding
    4748        _ = json.NewDecoder(resp.Body).Decode(&translate)
    4849        sanityCheck(err)
Note: See TracChangeset for help on using the changeset viewer.