...
Tawesoft Logo

Source file src/tawesoft.co.uk/go/dialog/doc.go

Documentation: src/tawesoft.co.uk/go/dialog/doc.go

     1  // tawesoft.co.uk/go/dialog
     2  // 
     3  // Copyright © 2019 - 2020 Ben Golightly <ben@tawesoft.co.uk>
     4  // Copyright © 2019 - 2020 Tawesoft Ltd <opensource@tawesoft.co.uk>
     5  // 
     6  // Permission is hereby granted, free of charge, to any person obtaining a copy
     7  // of this software and associated documentation files (the "Software"), to deal
     8  // in the Software without restriction,  including without limitation the rights
     9  // to use,  copy, modify,  merge,  publish, distribute, sublicense,  and/or sell
    10  // copies  of  the  Software,  and  to  permit persons  to whom  the Software is
    11  // furnished to do so.
    12  // 
    13  // THE SOFTWARE IS PROVIDED  "AS IS",  WITHOUT WARRANTY OF ANY KIND,  EXPRESS OR
    14  // IMPLIED,  INCLUDING  BUT  NOT LIMITED TO THE WARRANTIES  OF  MERCHANTABILITY,
    15  // FITNESS FOR A PARTICULAR PURPOSE  AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
    16  // AUTHORS  OR COPYRIGHT HOLDERS  BE LIABLE  FOR ANY  CLAIM,  DAMAGES  OR  OTHER
    17  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    18  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    19  // SOFTWARE.
    20  
    21  // Package dialog implements simple cross platform native MessageBox/Alert
    22  // dialogs for Go.
    23  // 
    24  // Currently, only supports Windows and Linux targets.
    25  // 
    26  // On Linux, uses (in order of preference) `zenity`, `xmessage`, or stdio.
    27  // 
    28  // Example
    29  // 
    30  // Usage is quite simple:
    31  // 
    32  //     package main
    33  // 
    34  //     import "tawesoft.co.uk/go/dialog"
    35  // 
    36  //     func main() {
    37  //         dialog.Alert("Hello world!")
    38  //         dialog.Alert("There are %d lights", 4)
    39  //     }
    40  //
    41  // FROZEN - PLEASE MIGRATE
    42  //
    43  // These packages are moving to https://github.com/tawesoft/golib.
    44  //
    45  // This is to increase security against possible supply chain attacks such as
    46  // our domain name expiring in the future and being registered by someone else.
    47  //
    48  // Please migrate to https://github.com/tawesoft/golib (when available) instead.
    49  //
    50  // Most programs relying on a package in this monorepo, such as the dialog or
    51  // lxstrconv packages, will continue to work for the foreseeable future.
    52  //
    53  // Rarely used packages have been hidden for now - they are in the git commit
    54  // history at https://github.com/tawesoft/go if you need to resurrect one.
    55  //
    56  //
    57  // Package Information
    58  //
    59  // License: MIT-0 (see LICENSE.txt)
    60  //
    61  // Stable: yes
    62  //
    63  // For more information, documentation, source code, examples, support, links,
    64  // etc. please see https://www.tawesoft.co.uk/go and 
    65  // https://www.tawesoft.co.uk/go/dialog
    66  //
    67  //     2022-06-29
    68  //     
    69  //         * Update dialog to never use a format string with no args
    70  //     
    71  //     2019-11-16
    72  //     
    73  //         * Fix incorrect formatting of multiple arguments in Linux stdio fallback
    74  //     
    75  //     2019-10-16
    76  //     
    77  //         * Remove title argument from Alert function
    78  //     
    79  //     2019-10-01
    80  //     
    81  //         * Fix string formatting bug in Windows build
    82  //     
    83  //     2019-10-01
    84  //     
    85  //         * Support Unicode in UTF16 Windows dialogs
    86  //         * Use "golang.org/x/sys/windows" to provide WinAPI
    87  //         * Removes CGO and windows.h implementation
    88  //         * Linux stdio fallback alert no longer blocks waiting for input
    89  //     
    90  //     2019-09-30
    91  //     
    92  //         * First release
    93  //     
    94  package dialog // import "tawesoft.co.uk/go/dialog"
    95  
    96  // Code generated by internal. DO NOT EDIT.
    97  // Instead, edit DESC.txt and run mkdocs.sh.

View as plain text