Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 24 11:52
    hazebooth commented #223
  • Aug 23 18:21
    david-castaneda commented #223
  • Aug 23 18:12
    david-castaneda commented #173
  • Aug 14 12:33
    BentCoder edited #251
  • Aug 14 12:31
    BentCoder opened #251
  • Jul 31 18:06
    Mrcampbell commented #250
  • Jul 31 18:06
    Mrcampbell opened #250
  • Jul 29 06:05
    yudppp closed #249
  • Jul 29 06:05
    yudppp commented #249
  • Jul 29 03:14
    yudppp opened #249
  • Jul 25 14:37
    jar3k commented #225
  • Jul 18 18:47
    troyspencer commented #200
  • Jul 17 03:04
    MJLang commented #208
  • Jul 09 23:00
    jc21 commented #247
  • Jul 09 16:58
    annirudh commented #229
  • Jul 09 16:58
    annirudh commented #229
  • Jun 26 13:26
    ItsLeeOwen commented #207
  • Jun 26 13:20
    ItsLeeOwen commented #207
  • Jun 26 02:42
    mafuyuk commented #196
  • Jun 26 02:32
    mafuyuk commented #196
Alessio Pracchia
@Asoseil
there are two ways: you can use cli with additional flags or you can define a config file. With this last cli command you run realize on a path without commands
budineverend
@budineverend
settings:
  legacy:
    force: true
    interval: 100ms
server:
  status: false
  open: true
  port: 8000
  host: localhost
schema:
- name: Restapi
  path: .
  commands:
    vet:
      status: true
    fmt:
      status: true
    test:
      status: true
    generate:
      status: true
    install:
      status: true
  watcher:
    extensions:
    - go
    - html
    - css
    - js
    paths:
    - /
    ignored_paths:
    - .git
    - .realize
    - .idea
    - vendor
    - realize/assets
    - realize/bindata.go
my config settting like this, is it had a problem? sir
Alessio Pracchia
@Asoseil
please delete your config, and use the step by step configuration using realize init from your project dir, it’s the easiest way.
budineverend
@budineverend
oc
[21:11:33][REALIZE] Would you want to overwrite existing realize config? [y/n] (n) y
[21:11:33][REALIZE] Would you want to customize settings? [y/n] (n) y
[21:11:33][REALIZE] Set max number of open files (root required) [int] (os default)
os default how to do? sir
Alessio Pracchia
@Asoseil
i don’t remember the default on windows, maybe set 1000
budineverend
@budineverend
[21:11:33][REALIZE] Project path [string] (C:\Users\yiqiang\go\src\Restapi)
how about path? sir
Alessio Pracchia
@Asoseil
what’s the problem on this?
budineverend
@budineverend
whatshould i type on this cmd?
i don't understand this
C:\Users\yiqiang\go\src\Restapi
should i input like this?
C:\Users\yiqiang\go\src\Restapi
Alessio Pracchia
@Asoseil
press enter if the default is ok for you or set your custom value
budineverend
@budineverend
oc
[21:11:33][REALIZE] Vet additional arguments [string] (none)
how about this is one?
Alessio Pracchia
@Asoseil
it's like any other cli step by step system
budineverend
@budineverend
INVALID INPUT [21:11:33][REALIZE] Insert a path to watch (insert '!' to stop) [string]
this is i don't understand it, sir
budineverend
@budineverend
C:\Users\yiqiang\go\src\Restapi>realize start -run
[21:44:35][REALIZE] : Started on localhost:8000
[21:44:35][RESTAPI] : Watching 8 file/s 3 folder/s
⇨ http server started on 127.0.0.1:8000
is it done yet? sir
Capture.PNG
my data still doenst display it
settings:
  files:
    outputs:
      status: true
      path: ""
      name: .r.outputs.log
    logs:
      status: true
      path: ""
      name: .r.logs.log
    errors:
      status: true
      path: ""
      name: .r.errors.log
  flimit: 1000
  legacy:
    force: true
    interval: 100ms
server:
  status: true
  open: false
  port: 8000
  host: localhost
schema:
- name: Restapi
  path: C:\Users\yiqiang\go\src\Restapi
  commands: {}
  watcher:
    extensions:
    - go
    paths:
    - /
    ignored_paths:
    - .git
    - .realize
    - vendor
i already do step by step as the realize init
Maciej Niemczyk
@Macilias
hi, is there any documentation on realize with params backed by viper?
Maciej Niemczyk
@Macilias

I have args like this:

settings:
  legacy:
    force: false
    interval: 0s
server:
  status: false
  open: false
  host: localhost
  port: 3000
schema:
- name: xyz
  path: ./cmd/xyz-server
  commands:
    install:
      status: true
    run:
      status: true
  args:
  - --dbmigrationpath=store/xyz-migrations
  - --store=mysql
  - --rabbiturl=amqp://xyz:klp@localhost:1234/
  - --slackHook=
  - --slackHookDisabled=true
  - --pipedrive=mock
  watcher:
    extensions:
    - go
    - html
    - js
    paths:
    - /
    ignored_paths:
    - .git
    - .realize
    - vendor

now I can not set a param to "" by defining it explicite to be "" as here:

 - --slackHook=

If I ask viper for the param

slackHook := viper.GetString("slackHook") 
logrus.Infof("slackHook: %s", slackHook)

it returns next param definition instead:

slackHook: --slackHookDisabled
Alessio Pracchia
@Asoseil
What’s viper?
Maciej Niemczyk
@Macilias
Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats.... https://github.com/spf13/viper
Jens Ulrich Hjuler Pedersen
@Multiply

I'm trying to bundle static assets with shurcooL/vfsgen and then read straight from disk for local development, and for the last part I am relying on os.Getwd(), but since my projects are nested under subdirectories with a 'global' realize-file for my monorepo, the workingdir is the root of the folder, rather than each projects path. And in some instances it's $GOBIN which is less than ideal.

Ideally I want it to always read from git-root/third_party/x without having to pass in an extra argument to tell it where to read from.

Any ideas?

Jay Ma
@0xApe
settings:
  legacy:
    force: false
    interval: 0s
schema:
- name: api
  path: ./cmd/api
  commands:
    fmt:
      status: true
    install:
      status: true
    run:
      status: true
  watcher:
    extensions:
    - go
    paths:
    - /
    ignored_paths:
    - .git
    - .realize
    - vendor

once I run realize start, it only watchs file changes under cmd/api

Watching 1 file/s 1 folder/s

how could I let it watch the project folder?

rafal-kowal
@rafal-kowal
Hi guys, I have a quick question. Does realize not work with Windows or am I doing something wrong?
I am using Windows 10 with linux sub-system and docker-compose. My web app loads up just fine but it does not trigger new builds on saving changes to code.
AnPiakhota
@AnPiakhota
Hello. I have a small question and maybe you have ready answer. I'm implementing a web application that launches server on some port and is listening for requests. Everything is Ok when I start realize but on the next save I have this error "listen tcp :8085: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted". Is this something to solve easily by configuring?
ninedraft
@ninedraft
Hello there. Is it considered a bug that enabled test task doesn't run on file changes? Build task runs properly. Config:
    schema:
    - name: embark
      commands:
        build:
          status: true
          method: go build -v -o embark ./cmd/embark/
        test:
          status: true
      watcher:
        paths:
        - /
        ignored_paths:
        - vendor
Odell Joseph
@dragonpiper
commands in the the doc doesn't seem to work. commands run based on status , flags change nothing. Adding args like -v -cover to the test command just runs as normal.
Savas Vedova
@svedova
Hey guys, is there any way to pass ldflags to the build command in the realize config file?
I tried this but it fails cuz it can't find the package:
build:
  status: true
  args:
    - -ldflags -X my/path/to/file.version=my-version
David Wieczorek
@david-wieczorek
Hi guys, how could I solve this problem, installation OK but zsh problem, thanks ? zsh: command not found: realize
Jono Hartman
@jhartman86

hi all - anyone running into this error using Go 1.11?

bash-4.4# GO111MODULE=on CGO_ENABLED=0 realize start
[02:55:55][ZEROCARD] : Watching 506 file/s 60 folder/s
[02:55:55][ZEROCARD] : Install started
[02:55:55][ZEROCARD] : Install
 exec: not started

hesitant to file a github issue as this could not be a realize thing, but I had this exact same configuration working with go 1.10.x and the only thing changed was the Golang upgrade and switching over to go modules

Antoine
@AntoineToussaint
Quick question: I have a cmd folder and a pkg folder, I want to start cmd/main.go but also watch pkg, from the command line: is there a way?
pedropovw
@pedropovw
Hi guys, one question. I'm new on Go and realize... i was using realize without any issue in my project with standard configuration, but today i've init module into my project and from that moment i can not make realize works..... Anything that i'm mising on the configuration to be able to work with modules?
i'm able to go build && run my project but i can not start realize
ahummel25
@ahummel25
How do I get relize to run my main.go file?
realize*
So I have a project under $GOPATH/src/server/main.go. Do I run realize start main.go?
Edward Cheadle
@echeadle
I don't see a lot of activity on this site. I am having lots of issues with realize. When I run realize init it never breaks out of the loop. ANd I had to read most of the posts in this conversation to find "realize start --run"command would work. This made the example I found in: Setting up your Go Development Docker Environment by liz rice work. Nowhere in the documentation or in the Book did I see that. liz said "realize run", the documentation on the site says "realize start". If you do realize start --help you will see a bunch of commands. go install , go run and go build are disabled by default. A reasonable default, but the documentation does not give much help. realize start --run will run go run and then things work. You need to be in the project folder.I assume it looks for the main.go file so you don't have to add it to the command.
Benjamin Bordel
@BenjaminB64
Hello here, someone tried realize with go 1.12 ? Someone else got these errors ?
image.png